I just ran
npm update inside an existing project. Several libraries were updated, including Vue:
$ npm update
> email@example.com install /Users/david/vue/quasar/AP-CDL/node_modules/fsevents
> node install
[fsevents] Success: "/Users/david/vue/quasar/AP-CDL/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote
npm WARN firstname.lastname@example.org No repository field.
npm WARN email@example.com No license field.
added 30 packages, removed 45 packages and updated 165 packages in 40.617s
And after that, running the dev server would build OK, but then just fail with ‘Error’ - no explanation:
$ quasar dev
> firstname.lastname@example.org dev /Users/david/vue/quasar/AP-CDL
> node build/script.dev.js
Starting dev server with "mat" theme...
Will listen at http://localhost:8080
Build completed in 4.46s
ERROR Failed to compile with 1 errors 1:51:55 PM
In the end, I installed a fresh app using the cli, and replaced each file one by one until I got it to work. Turned out it was the
package-lock.json file that was the culprit - I removed it and the
node_modules/ folder, then ran
npm i and all was well. I’ve not edited that file, and the only changes to
package.json were via running
npm i -S lodash and so on.
So, what did I do wrong with the update?