[FIXED] npm install fail — error message: enoent ENOENT: no such file or directory

Issue

i’m building an Vue.js project using vue init webpack project_name,after this step I ran npm install. and npm threw out errors below:

npm ERR! path /Users/duodian/Desktop/crop-demo/node_modules/js-
beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod 
'/Users/duodian/Desktop/crop-demo/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/duodian/.npm/_logs/2017-09-18T09_55_20_047Z-debug.log

node version 8.5.0
npm version 5.3.0
Note: I just updated my macOS HighSierra to 10.13 Beta, does this affect?

had any friends have this problem?

Solution

Running

npm install js-beautify@1.6.14

and then

npm install (assuming that you are installing deps in package.json)

worked for me. Got it from here.
https://github.com/beautify-web/js-beautify/issues/1247

Answered By – tanhernandez

Answer Checked By – Pedro (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published