If you do not set a global installation path, the default is the node installed under your lib/node_modules version, so when you switch node versions, you will find that the node_modules installed globally in the previous node version cannot be found. , so you need to set the global installation path
If you have bash, add it in .bash_profile. If you use zsh, add it in .zshrc
Remember source to let it take effect.
The issue of inaccessibility has been activated. I need to take a look at your code (post part of your code to see). I can’t give an answer for the time being. I hope it will be helpful to you
If you use nvm, npm install is for the node version, and packages of different versions are not shared
If you do not set a global installation path, the default is the
node
installed under yourlib/node_modules
version, so when you switch node versions, you will find that the node_modules installed globally in the previous node version cannot be found. , so you need to set the global installation pathIf you have bash, add it in
.bash_profile
. If you use zsh, add it in.zshrc
Remember
source
to let it take effect.The issue of inaccessibility has been activated. I need to take a look at your code (post part of your code to see). I can’t give an answer for the time being. I hope it will be helpful to you