Cordazar / crest

REST API Server for MongoDB
MIT License
174 stars 58 forks source link

Npm Global Install Fails #11

Open tmarrs opened 8 years ago

tmarrs commented 8 years ago

I get the following error when I use npm install crest - g:

json-at-work => npm install crest -g
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/tmarrs/.nvm/v4.2.2/bin/node" "/Users/tmarrs/.nvm/v4.2.2/bin/npm" "install" "crest" "-g"
npm ERR! node v4.2.2
npm ERR! npm  v3.3.10
npm ERR! path /Users/tmarrs/.nvm/v4.2.2/lib/node_modules/crest/bin/server
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/tmarrs/.nvm/v4.2.2/lib/node_modules/crest/bin/server'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tmarrs/projects/json-at-work-examples/npm-debug.log

It looks like the chmod is happening before the server.js file exists. I've installed Node with NVM, but that shouldn't matter.

But the git clone install works great. Thanks for this excellent module, but please fix the npm global install issue.

gaborre commented 7 years ago

Before you execute npm install -g, change in the file package.json: "server": "./bin/server" to "server": "./bin/crest".

Regards!

kdmcnamara commented 6 years ago

Fixed this with @gaborre's advice. Making a PR now so others won't run into this issue.

numman-ali commented 6 years ago

Hi, I'm still facing this issue on windows 10