Published 2 weeks ago by curtiplas
Hello All, I'm unable to get npm installed correctly in my laravel project. I'm running laravel on a vagrant box (ubuntu-trusty-64). When I run 'npm install' I get the first error in my pastebin (linked below). I then found somewhere below that I should run it without symlinks when using a vagrant box on a windows host os so I then ran 'npm install --no-bin-links' and I was still getting the first error. So then with some help I ran 'rm -rf node_modules' then ran the 'npm install --no-bin-links' and it appears to work but hangs see second half of the pastebin.
Just to update everyone on the status, I completely removed npm and reinstalled it following:
for node.js 8
I then ran 'sudo npm install --no-bin-links --verbose' directly from the host vm via virtualbox bypassing the vagrant ssh; but it still bombs out on me; this time with an error. but still surrounding fsevents.
27990 info lifecycle [email protected]~postinstall: [email protected] 27991 verbose unlock done using /home/vagrant/.npm/_locks/staging-71408633a969dee2.lock for /home/vagrant/projects/MusekClub/node_modules/.staging 27992 verbose stack Error: ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules' 27993 verbose cwd /home/vagrant/projects/MusekClub 27994 verbose Linux 3.13.0-125-generic 27995 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links" "--verbose" 27996 verbose node v8.2.1 27997 verbose npm v5.3.0 27998 error path /home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules 27999 error code ETXTBSY 28000 error errno -26 28001 error syscall rmdir 28002 error ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/node_modules' 28003 verbose exit [ -26, true ]
Just an update. I completely rebuilt the vagrant box from scratch and tried again. same issue.
Here is the cmd ln output:
[email protected]:~/projects/MusekClub$ sudo npm install npm ERR! path /home/vagrant/projects/MusekClub/node_modules/fsevents/build/Release/.deps/User/eshanker/Code/fsevents/lib npm ERR! code ETXTBSY npm ERR! errno -26 npm ERR! syscall rmdir npm ERR! ETXTBSY: text file is busy, rmdir '/home/vagrant/projects/MusekClub/node_modules/fsevents/build/Release/.deps/Users/eshanker/Code/fsevents/lib' npm ERR! A complete log of this run can be found in: npm ERR! /home/vagrant/.npm/_logs/2017-08-09T12_45_58_590Z-debug.log
Well installing grunt didn't help at all. However, I installed yarn and instead of bombing out at fsevents it reads it as an optional dependency.
I get the following:
[email protected]:~/projects/MusekClub$ sudo yarn install yarn install v0.27.5 Resolving packages... Fetching packages... warning [email protected]: The platform "linux" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. Linking dependencies... Building fresh packages... Done in 67.15s.
What's better is it looks like it actually works as I'm now able to run yarn dev.
Thank you so much!!!
I did a little more research on the fsevents error. It's quite common, so i wouldn't worry about it as i believe your dependencies don't rely on this.
I've made the switch to yarn now anyway, so you may aswell. It still does the same as NPM but i find it a little faster and in this case, less strict.
Best of luck.