rabol's avatar
Level 14

npm install after homestead re-install

Hi

I have re-installed Homestead and it runs on vagrant box v 9.7.2

when I create a new laravel project like this:

laravel new test

cd test

composer require laravel/ui

php artisan ui --auth bootstrap

npm install && npm run dev

then npm fails:

npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@types/browser-sync/node_modules/chokidar/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 WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/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! code ENOENT npm ERR! syscall open npm ERR! path /home/vagrant/code/test/node_modules/@types/autoprefixer/node_modules/chalk/package.json.4258318513 npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/test/node_modules/@types/autoprefixer/node_modules/chalk/package.json.4258318513' 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/2021-01-24T10_03_02_601Z-debug.log

it say that a 'file is not found' but how can that be during installation

I have other projects on the same homestead, and they work fine.

0 likes
2 replies
arkadiy's avatar

Have you tried to manually remove node_modules folder and package-lock.json file and run npm install && npm run dev?

Also tell what host operating system do you use for Homestead

rabol's avatar
Level 14

tried to delete, same result

host is Mac, but the command is executed in the VM

homestead ssh and then execute the command

I tried a new laravel installation today and got this:

Skipped installation of bin bin/commonmark for package league/commonmark: file not found in package

and then when I run npm install it fail on another package

'/home/vagrant/code/litstack/node_modules/webpack/node_modules/pkg-dir/package.json.1441625936'

Please or to participate in this conversation.