culeaalex's avatar

Npm install on clean Laravel 7 fails

Hi,

Installed Laravel 7 in vagrant. Installed node.js 12 and npm 6 On run "npm install" >> error:

npm ERR! syscall open
npm ERR! path /var/www/html/node_modules/yargs/node_modules/yargs-parser/package.json.3092714995
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/var/www/html/node_modules/yargs/node_modules/yargs-parser/package.json.3092714995'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent```

As I see, in node_modules there is no folder yargs
0 likes
2 replies
bobbybouwmann's avatar

Try removing the node_modules directory and run npm install again

culeaalex's avatar
culeaalex
OP
Best Answer
Level 1

Had to:

  • add config.vm.synced_folder to type: "nfs" to vagrant file (I have a custom vagrant file, not homestead)
  • add a config.vm.network :private_network, ip: 'some_ip' to vagrant file
  • run npm install --no-bin-links (because after first 2 steps it have me a symlinks error)

Please or to participate in this conversation.