1

when install db-mysql package on node.js proeject . this error occured

npm http GET http://registry.npmjs.org/db-mysql
npm http 304 http://registry.npmjs.org/db-mysql

> [email protected] install D:\vhosts\node.m.com\node_modules\db-mysql
> node-waf configure build

'node-waf' is not recognized as an internal or external command,
operable program or batch file.

> [email protected] preuninstall D:\vhosts\node.m.com\node_modules\db-mysql
> rm -rf build/*

'rm' is not recognized as an internal or external command,
operable program or batch file.
npm WARN continuing anyway [email protected] preuninstall: `rm -rf build/*`
npm WARN continuing anyway `cmd "/c" "rm -rf build/*"` failed with 1

npm ERR! [email protected] install: `node-waf configure build`
npm ERR! `cmd "/c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the db-mysql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls db-mysql
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "db-mysql"
1
  • I don't think node-waf is available on Windows. It was used to build native extensions (gyp is advised today). You might want to try felixge's mysql module instead -- I think it's more widely used anyway. Commented May 9, 2012 at 11:07

2 Answers 2

3

you are trying to install binary module from source under windows using npm which currently does not work well out of the box. node-waf is just a build tool, you also need at least compiler and node headers.

Possible solutions:

  • try to install manually (read this article)
  • use non binary, javascript only module such as node-mysql ( npm install mysql )
Sign up to request clarification or add additional context in comments.

Comments

0

Try this command: npm install mysql from your command prompt or terminal... the most common way to install a package for node.js is through npm.

2 Comments

The asker is using npm. The command you're suggesting won't work.
mysql and db-mysql are two different modules. One is native and another one is not. It should not be given as a solution but rather mentioned as an alternative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.