davidxd33's avatar

ENONET error on Laravel 5.6: file not found abbrev.DELETE

I am trying to install the npm packages on a fresh install of Laravel 5.6 on homestead but I keep getting an npm error.

vagrant@homestead:~/project$ sudo npm install
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 WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename '/home/vagrant/project/node_modules/.staging/fsevents-d083c106/node_modules/abbrev' -> '/home/vagrant/project/node_modules/.staging/abbrev-cbbeb1a0'

npm ERR! path /home/vagrant/project/node_modules/abbrev
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/vagrant/project/node_modules/abbrev' -> '/home/vagrant/project/node_modules/.abbrev.DELETE'
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/vagrant/.npm/_logs/2018-04-04T19_25_44_097Z-debug.log

I've tried:

  • Updating npm & node
  • Deleting node_modules and running npm install
  • Using sudo

I am on a windows machine using laravel homestead.

Node: v9.10.0

NPM: v5.6.0

Laravel: 5.6

Laravel homestead: v7.3

Linux homestead 4.4.0

0 likes
12 replies
rin4ik's avatar

please delete node_modules folder and run these commands again

npm cache clean
npm install
davidxd33's avatar

@rin4ik with that now it moved to another package, acorn.

vagrant@homestead:~/project$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
vagrant@homestead:~/project$ rm -rf node_modules/
vagrant@homestead:~/project$ npm install
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 WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename '/home/vagrant/project/node_modules/.staging/fsevents-d083c106/node_modules/ansi-regex' -> '/home/vagrant/project/node_modules/.staging/ansi-regex-d8c30e7d'

npm ERR! path /home/vagrant/project/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 '/home/vagrant/project/node_modules/acorn' -> '/home/vagrant/project/node_modules/.acorn.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
rin4ik's avatar

Did you run the bash window as administrator in Windows?

davidxd33's avatar

@rin4ik I've been running the commands on the virtual machine. When I used the bash window as administrator on my Windows I got this:

λ npm install
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
C:\Users\dponc\Code\project
+-- [email protected]  extraneous
+-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| `-- [email protected]
+-- [email protected]  extraneous
+-- [email protected]  extraneous
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| `-- [email protected]
+-- [email protected]  extraneous
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none was installed.
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! path C:\Users\dponc\Code\project\node_modules\.staging\acorn-f48f8186
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename

npm ERR! Error
npm ERR!     at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:29:7)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:114:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\dponc\Code\project\node_modules\.staging\acorn-f48f8186' -> 'C:\Users\dponc\Code\project\node_modules\acorn'
npm ERR!  Error
npm ERR!     at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:29:7)
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:114:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\dponc\Code\project\node_modules\.staging\acorn-f48f8186' -> 'C:\Users\dponc\Code\project\node_modules\acorn'
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:\Users\dponc\AppData\Roaming\npm-cache\_logs18-04-04T22_13_15_304Z-debug.log

It keeps switching from acorn to abbrev everytime I run npm install

rin4ik's avatar

Run with antivirus disabled (if you use Windows Defender, turn off Real-Time protection and Cloud-based protection). restart the server

davidxd33's avatar

@rin4ik Now symlink error

vagrant@homestead:~/project$ sudo npm install
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 WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/home/vagrant/project/node_modules/.bin/acorn'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-04-04T22_55_42_410Z-debug.log
davidxd33's avatar

@rin4ik Hey that worked, the primary issue is solved but now when I tried to compile assets with npm run dev I get:

vagrant@homestead:~/project$ npm run dev

> @ dev /home/vagrant/project
> npm run development


> @ development /home/vagrant/project
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

sh: 1: cross-env: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

rin4ik's avatar

cross-env must have updated its paths, it has "cross-env/dist/bin" not "cross-env/bin/"

in package.json (EDIT)

    "dev": "development node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "development node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "development node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "development node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules
rin4ik's avatar

if you don't have package "cross-env" installed add it in package.json devDependencies "cross-env": "^5.1", then run command npm update

Please or to participate in this conversation.