Trouble upgrading an existing project
I just ran
npm updateinside 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. + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com + firstname.lastname@example.org + email@example.com 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 error
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.jsonfile that was the culprit - I removed it and the
node_modules/folder, then ran
npm iand all was well. I’ve not edited that file, and the only changes to
package.jsonwere via running
npm i -S lodashand so on.
So, what did I do wrong with the update?
a47ae last edited by
So there is a known error in Vue 2.4 (http://forum.quasar-framework.org/topic/616/do-not-upgrade-to-vue-2-4-x-yet/9) but this shouldn’t prevent your build from running through. But it is hard to tell, do you have a diff of your old lock file and the new one?
Tx. I will keep an eye on that other thread. Sadly I don’t have the original
package-lock.jsonfile I’m afraid. But I do have other projects currently using vue 2.3.0 which I could upgrade in the same way and post the results if they’re useful…
package-lock.jsoncan be deleted without affecting anything. I recommend also deleting
node_modules/folder then doing an
npm installif problems are encountered.