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

giviz's avatar
Level 3

ENOENT: no such file or directory

Hey guys,

Fresh laravel 5.6 installation on debian with Npm version 5.6.0

giviz@localhost:/mnt/hgfs/Code/project.test/gui$ npm install --no-bin-links npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! path /mnt/hgfs/Code/project.test/gui/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/hgfs/Code/project.test/gui/node_modules/.acorn-dynamic-import.DELETE/node_modules/acorn' -> '/mnt/hgfs/Code/project.test/gui/node_modules/acorn-dynamic-import/node_modules/acorn'
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!     /home/giviz/.npm/_logs/2018-02-28T01_50_41_979Z-debug.log

Each time I try, it's the same error but often a different package that's failing.

I've tried :

1 - npm install
2 - npm install --no-bin-links
3 - removing node_modules and package-lock.json and do it again
4 - npm install xxx of each xxx that fail, but then some just keep failing on the npm install

Any idea how I can solve that ?

Thanks

0 likes
3 replies
Yamen's avatar

These issues occur alot because of regular npm and plugins updates, So try to update nodejs and npm and finally run npm cache clean.

giviz's avatar
Level 3

I've run the clean cache command, updated the npm to the last version and removed the node_modules folder.

Sadly, I still get the same error with that acorn-dynamic-import that make the npm install failed :/

Any other idea ?

Thanks

giviz's avatar
giviz
OP
Best Answer
Level 3

Ok I figure out what was causing the issue. The project is stored on a file shared directory in my mac used by VMWare on a linux dev VM.

It seems that that cause some issue, because once I've move the project inside the VM, npm install works fine.

Please or to participate in this conversation.