1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

240328 dependencies issue in nuxt.js

Last updated at Posted at 2024-03-28

Situation

  • download website data from Git Hub which is pushed 4 years ago from a different environment so taht update information and re-deploy.
  • failed to nuxt dev because nuxt is not found.

How to solve errors

  1. npm install --> failed to install node-sass

  2. interpret error code to solve dependencies issues and change the version to appropriate one npm install package_name@version

    • node-sass require python@2 but @3 is set
      • get python path using which python2
      • set python@2 in npm npm config set python python2_path
    • npm was downgraded to @8 for python@2
    • nuxt was downgraded to @2
    • sass-loader was downgraded to 10.0.2
  3. Node-sass install

  4. after these version changes, run npm audit fix

  5. install modules required: vue-meta[^1] / vue-no-ssr / vue-router@3

    1. install required modules in according to errors npm install module_name --> module names will be on "dependencies" of package.json.
    2. remove old modules and install content rm -rf node_modules -->rm package-lock.json.
    3. npm install-->node_modulesandpackage-lock.json` (contents installed is recorded in this file) will be generated.

*vue-meta installation help: https://github.com/nuxt/nuxt/issues/2535

*vue-router@3 installation help (vue-router@4 competed with vue@3): https://stackoverflow.com/questions/72444072/i-cant-install-vue-router-by-npm

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?