Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JillzTom's avatar

Error installing npm

I'm trying to follow https://laracasts.com/series/build-project-flyer-with-me/episodes/3 lesson.

I tried

npm install

But got the following error:

C:\wamp\www\nom5\laravel>npm install
npm WARN optional dep failed, continuing fsevents@0.3.7
-


> node-sass@3.2.0 install C:\wamp\www\nom5\laravel\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass
> node scripts/install.js

Binary downloaded and installed at C:\wamp\www\nom5\laravel\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-14\binding.node
|


> node-sass@3.2.0 postinstall C:\wamp\www\nom5\laravel\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js

` C:\wamp\www\nom5\laravel\node_modules\laravel-elixir\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-14\binding.node ` exists.
 testing binary.
Binary is fine; exiting.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! path C:\Users\Jil\AppData\Roaming\npm-cache\readable-stream\2.0.2\package\package.json
npm ERR! code EPERM
npm ERR! errno -4048

npm ERR! Error: EPERM, rename 'C:\Users\Jil\AppData\Roaming\npm-cache\readable-stream\2.0.2\package\package.json'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM, rename 'C:\Users\Jil\AppData\Roaming\npm-cache\readable-stream\2.0.2\package\package.json']
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   path: 'C:\\Users\\Jil\\AppData\\Roaming\\npm-cache\\readable-stream\\2.0.2\\package\\package.json',
npm ERR!   parent: 'through2' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\wamp\www\nom5\laravel\npm-debug.log

Versions---- node v0.12.7
npm v2.11.3

I freshly installed the Node.js and npm. Any idea?

0 likes
6 replies
taijuten's avatar

Looks like you're using windows. Are you running your terminal (or git bash etc) as Administrator?

JillzTom's avatar

@taijuten : I used the terminal from the phpstorm
I even tried with command prompt as Administrator. Still getting the same error.

JillzTom's avatar
JillzTom
OP
Best Answer
Level 10

I've done the following things at the laravel installation directory.

npm update
npm install gulp -g

This solved the problem.

sivaprasad's avatar

I have run npm update and npm install gulp -g. Still I am getting errors.

devmark's avatar

Please try running this command again as root/Administrator.

so

sudo npm install
sivaprasad's avatar

I tried with sudo npm install but did not work. I did sudo npm install gulp -g, sudo npm install larave-elixer -g,sudo npm install bootstrap-sass -g. This worked for me.

Please or to participate in this conversation.