user822697
user822697

Reputation: 59

installing mongoose on windows

I am trying to install mongoose on a windows 7 machine by

npm install mongoose

but cant get it to work. the error is:

kerberos.vcxproj -> D:\dan\revert\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\Release\\kerberos.node

> [email protected] install D:\dan\revert\node_modules\mongoose\node_modules\mongodb\node_modules\mongodb-core\node_modules\bson\node_modules\bson-ext
> ./node_modules/node-pre-gyp/bin/node-pre-gyp.js install --fallback-to-build

'.' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional dep failed, continuing [email protected]
npm ERR! peerinvalid The package mongoose does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants mongoose@~3

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongoose"
npm ERR! cwd D:\dan\revert
npm ERR! node -v v0.10.34
npm ERR! npm -v 1.4.28
npm ERR! code EPEERINVALID
npm ERR! not ok code 0

I tried:

  1. npm install -g node-gyp
  2. npm uninstall mongodb --save npm install mongoose --save

Any idea will be welcome

Upvotes: 2

Views: 9532

Answers (2)

Rubens Fernandes
Rubens Fernandes

Reputation: 25

npm install --save [email protected]

Upvotes: 0

Splitty
Splitty

Reputation: 637

I would have left a comment, but I don't have enough reputation points.

I agree with @user645715, try a lower version of mongoose. Or install the latest node & npm. Look into Node Version Manager (NVM) for easy switching between versions of node.

On windows to get node-gyp to build you need to install Python 2.7 and have the visual studio build components. Just install Visual Studio Express. This is all in the node-gyp documentation: https://www.npmjs.com/package/node-gyp

Upvotes: 1

Related Questions