Cordazar / crest

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

npm install exits with Error: ENOENT, chmod ... #1

Open jasonnathan opened 10 years ago

jasonnathan commented 10 years ago

Hi there, I tried installing crest on my digital ocean ubuntu box and got the following error:

npm ERR! Error: ENOENT, chmod '/usr/lib/node_modules/crest/bin/server'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "node" "/usr/bin/npm" "install" "crest" "-g"
npm ERR! cwd /root
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.26
npm ERR! path /usr/lib/node_modules/crest/bin/server
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

I tried googling the problem and stumbled upon a stackoverflow question with this as the chosen answer:

Ok it looks like NPM is using your .gitignore as a base for the .npmignore file, and thus ignores /lib. If you add a blank .npmignore file into the root of your application, everything should work.

[edit] - more info on this behaviour here: https://npmjs.org/doc/developers.html#Keeping-files-out-of-your-package

Please see http://stackoverflow.com/questions/17990647/npm-install-errors-with-error-enoent-chmod for details on the question.

Also, Digital Ocean defaults to root access login on Ubuntu boxes. Don't know if this might be relevant.

Thanks.

richardwlu commented 8 years ago

@jasonnathan @ledsun Has there been a resolution for this? I'm currently having the same issue on Ubuntu 14.04 Digital Ocean box

jasonnathan commented 8 years ago

I haven't touched it since. Sorry.

richardwlu commented 8 years ago

That's fine. What would I need to do to let it work?

On Thu, Apr 07, 2016 at 7:39 PM Jason Nathan

< mailto:Jason Nathan notifications@github.com

wrote:

I haven't touched it since. Sorry.

You are receiving this because you commented.

Reply to this email directly or https://github.com/Cordazar/crest/issues/1#issuecomment-207149704 https://github.com/Cordazar/crest/issues/1#issuecomment-207149704

jasonnathan commented 8 years ago

I wouldn't know. I haven't succeeded and I didn't attempt after that On Apr 8, 2016 8:47 AM, "Richard Lu" notifications@github.com wrote:

That's fine. What would I need to do to let it work?

On Thu, Apr 07, 2016 at 7:39 PM Jason Nathan

< mailto:Jason Nathan notifications@github.com

wrote:

I haven't touched it since. Sorry.

You are receiving this because you commented.

Reply to this email directly or https://github.com/Cordazar/crest/issues/1#issuecomment-207149704 https://github.com/Cordazar/crest/issues/1#issuecomment-207149704

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/Cordazar/crest/issues/1#issuecomment-207150767

ledsun commented 8 years ago

@richardwlu I think this is caused by the difference between a file name in the bin directory and the command name in the package.json.

Fix package.json like #3, it may work well. I haven't touched it since. Sorry.