Laravel 5.3 - Error with "npm install laravel-elixir"

Published 2 years ago by cschoeni

When i install a fresh Laravel Project and make all what is read on Laravel Page "https://laravel.com/docs/5.3/elixir" its my error every time on laravel-elixir.

[email protected]:~/Code/Laravel/example$ npm install laravel-elixir
/home/vagrant/Code/Laravel/example
└── (empty)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "laravel-elixir"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.7
npm ERR! path ../semver/bin/semver
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../semver/bin/semver' -> '/home/vagrant/Code/Laravel/example/node_modules/accord/node_modules/.bin/semver'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Code/Laravel/example/npm-debug.log
npm ERR! code 1

When i try with gulp then came the failure

[email protected]:~/Code/Laravel/example$ gulp
module.js:457
    throw err;
    ^

Error: Cannot find module 'laravel-elixir'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vagrant/Code/Laravel/example/gulpfile.js:1:78)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
[email protected]:~/Code/Laravel/example$ node -v
v6.4.0
[email protected]:~/Code/Laravel/example$ npm -v
3.10.7
tomopongrac
cschoeni

Thanks for your answser. No i make all what he write in this dicussion (link).

cschoeni

I removed now my laravel/homestead maschine and now i try again with gulp.

Apogee
Apogee
2 years ago (16,680 XP)

I'm having the sam issue... any suggestions? Is this maybe related to the Ubuntu version of my virtual machine, it is Ubuntu 14.04.4 LTS. If it is, how can I update it to Ubuntu 16.04? I've tried "vagrant box update box_id" and it has updated homestead box, but Ubuntu version is still 14.04.4 LTS?

thefiend

I am having the same issue as this guy with Laravel 5.3, hoping that someone has a solution to this error.

[email protected]:~/Repositories/<project name>$ sudo npm install --no-optional
/home/vagrant/Repositories/<project name>
└── (empty)

npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-optional"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! path ../semver/bin/semver
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../semver/bin/semver' -> '/home/vagrant/Repositories/<project name>/node_modules/accord/node_modules/.bin/semver'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Repositories/<project name>/npm-debug.log
npm ERR! code 1

Box 'laravel/homestead' (v0.5.0)

{ npm: '3.8.6', ares: '1.10.1-DEV', http_parser: '2.7.0', icu: '56.1', modules: '47', node: '5.12.0', openssl: '1.0.2h', uv: '1.8.0', v8: '4.6.85.32', zlib: '1.2.8' }

nate.a.johnson

Delete your node_modules. Make sure you have node 6 and npm 3. Reinstall your dependencies and try again.

thefiend

@nate.a.johnson Still having the same issue.

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! path ../semver/bin/semver
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../semver/bin/semver' -> '/home/vagrant/Repositories/<Project Name>/node_modules/accord/node_modules/.bin/semver'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Repositories/<Project Name>/npm-debug.log

Update: I have somehow managed to fix it by doing this a couple of times.

sudo npm install --no-bin-links

I am able to gulp already.

ksorbo
ksorbo
1 year ago (13,030 XP)

This page gives a rather clear explanation for the problem:

https://github.com/npm/npm/issues/7308

Please sign in or create an account to participate in this conversation.