Error reporting when executing npm install-g vue-cli, executing vue init webpack project also reporting error

clipboard.png

npm install -g vue-cli

node:v8.4.0

webpack:

npm:6.0.1

vue init webpack project vue-cli


sudo sudo npm i -g vue-cli

clipboard.png

Mar.23,2021

clipboard.png





~~
clipboard.png


I have also encountered it, which is caused by permission confusion. I tried to delete the node modules folder under the system account directory and the project directory.


delete all the files in node_module, and then npm install them again. May be off the network, lost files, you can use Taobao mirror to try.


I see a sentence: accsess denied, check permissions


Don't install global node and use nvm to manage node versions so that the whole node-based development will be much smoother


one of the rules of best practice seen before is that it is best not to install tools such as node npm vim with root permissions. As the previous respondents said, root permissions delete the previous node_modules,. It should be OK to reinstall it with the current user

Menu