Trouble upgrading an existing project



  • I just ran npm update inside an existing project. Several libraries were updated, including Vue:

    $ npm update
    
    > fsevents@1.1.2 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 quasar-app@0.0.1 No repository field.
    npm WARN quasar-app@0.0.1 No license field.
    
    + babel-runtime@6.25.0
    + eslint-loader@1.9.0
    + eslint-plugin-import@2.7.0
    + extract-text-webpack-plugin@2.1.2
    + babel-loader@7.1.1
    + babel-core@6.25.0
    + eslint-plugin-node@4.2.3
    + opn@5.1.0
    + html-webpack-plugin@2.30.1
    + json-loader@0.5.7
    + progress-bar-webpack-plugin@1.10.0
    + roboto-fontface@0.7.1
    + shelljs@0.7.8
    + purify-css@1.2.6
    + url-loader@0.5.9
    + vue@2.4.2
    + webpack@2.7.0
    + vue-router@2.7.0
    + vue-template-compiler@2.4.2
    + webpack-dev-middleware@1.12.0
    + webpack-hot-middleware@2.18.2
    + vue-loader@12.2.2
    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
    
    > quasar-app@0.0.1 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.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?



  • 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.json file 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…


  • Admin

    package-lock.json can be deleted without affecting anything. I recommend also deleting node_modules/ folder then doing an npm install if problems are encountered.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.