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

Rainieren's avatar

NodeJS npm install Installation error

Hello, I'm using PHPStorm for my project and every time I start a new Laravel project it automatically asks me to do npm install. But If I do that I get this error. I'm sorry if it is a bit too long

npm ERR! path C:\xampp\htdocs\laravel\ICT-Hulp\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rmdir
npm ERR! Error: EPERM: operation not permitted, rmdir 'C:\xampp\htdocs\laravel\ICT-Hulp\node_modules\fsevents\node_modules'
npm ERR!  { Error: EPERM: operation not permitted, rmdir 'C:\xampp\htdocs\laravel\ICT-Hulp\node_modules\fsevents\node_modules'
npm ERR!   stack: 'Error: EPERM: operation not permitted, rmdir \'C:\xampp\htdocs\laravel\ICT-Hulp\node_modules\fsevents\node_modules\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rmdir',
npm ERR!   path: 'C:\xampp\htdocs\laravel\ICT-Hulp\node_modules\fsevents\node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LENOVO\AppData\Roaming\npm-cache\_logs17-11-03T18_24_06_826Z-debug.log

Does anyone know what is causing this? And how can I solve it?

0 likes
1 reply
frezno's avatar
frezno
Best Answer
Level 36

@Rainieren you should try to install the npm modules not via PHPStorm but to close it and just use your terminal (cmd command on Windows). Sometimes there can be a conflict with some open files.

But most of the times the problem is npm itself. Usually it helps to downgrade or upgrade npm and then it'll work. npm can be a realy b*tch.

Please or to participate in this conversation.