Saturday, 27 May 2017

laravel 5.4 package.json invalid

I am running homestead in vagrant on my windows 10 machine for Laravel 5.4. I was following the beginner laracasts (episode 14), which directed me to run npm install. I noticed my output was significantly shorter than the one in the tutorial, only listing

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Upon further investigation, running npm show gave the error

npm ERR! Invalid package.json npm ERR! A complete log of this run can be found in: npm ERR! /home/vagrant/.npm/_logs/2017-05-27T23_01_22_283Z-debug.log

Here is the log referenced above:

0 info it worked if it ends with ok 1 verbose cli [ '/home/vagrant/.nvm/versions/node/v7.10.0/bin/node', 1 verbose cli '/home/vagrant/.nvm/versions/node/v7.10.0/bin/npm', 1 verbose cli 'show' ] 2 info using npm@4.6.1 3 info using node@v7.10.0 4 verbose stack Error: Invalid package.json 4 verbose stack at /home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/lib/view.js:84:30 4 verbose stack at /home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5 4 verbose stack at checkBinReferences_ (/home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45) 4 verbose stack at final (/home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3) 4 verbose stack at then (/home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5) 4 verbose stack at /home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/read-package-json/read-json.js:311:12 4 verbose stack at /home/vagrant/.nvm/versions/node/v7.10.0/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16 4 verbose stack at tryToString (fs.js:449:3) 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:436:12) 5 verbose cwd /home/vagrant/Code/Circles 6 verbose Linux 4.4.0-66-generic 7 verbose argv "/home/vagrant/.nvm/versions/node/v7.10.0/bin/node" "/home/vagrant/.nvm/versions/node/v7.10.0/bin/npm" "show" 8 verbose node v7.10.0 9 verbose npm v4.6.1 10 error Invalid package.json 11 verbose exit [ 1, true ]

I am no npm expert, but I cannot see any evident issues with the package.json. is one of the dependencies not valid or did I break something?



via Omega

No comments:

Post a Comment