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

ayu's avatar
Level 4

Homestead: First Time Setup - Npm error

I have just installed Homestead with vagrant and virtualbox for the first time. My operating system is Windows. The installation worked without problems. Now I have executed the command "npm install" via command line (git bash) and received the following error message.

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 ../@babel/parser/bin/babel-parser.js
npm ERR! code EIO
npm ERR! errno -5
npm ERR! syscall symlink
npm ERR! EIO: i/o error, symlink '../@babel/parser/bin/babel-parser.js' -> '/home/vagrant/code/liveeasy/node_modules/.bin/parser'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2019-05-29T15_18_35_562Z-debug.log

Unfortunately, Google did not find any helpful results.

For any help, I would be very grateful.

0 likes
7 replies
aurawindsurfing's avatar

Hi, I had numerous problems with this setup. For a quick fix try to ditch npm and use yarn instead.

remove whole

/node_modules

run

yarn install

Hope it helps!

1 like
ayu's avatar
Level 4

@aurawindsurfing thank you. Installation with yarn worked. If I run now the command "npm run dev" I got now an error, too.

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! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2019-05-29T15_42_40_434Z-debug.log
error Command failed with exit code 1.

Do you have any solutions for this error?

Thank you!

aurawindsurfing's avatar

Just think about it for a second... you did not use npm to install right? Now you want ot use it to npm run dev if npm is cousing problems in your installation try to use yarn only.

1 like
ayu's avatar
Level 4

@aurawindsurfing yes, you are right.

I missed an error in the installation with yarn.

[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
error An unexpected error occurred: "EIO: i/o error, symlink '../../../parser/bin/babel-parser.js' -> '/home/vagrant/code/liveeasy/node_modules/@babel/core/node_modules/.bin/parser'".

Well, yarn doesn't work either. It's the same error as with npm...

Ziya584's avatar

I have the same problem. Does anybody have solution?

ayu's avatar
Level 4

I didn't found a solution to get it work, sorry

Take's avatar

Had the same issue, solved by running vagrant as an administrator

Please or to participate in this conversation.