明天用npm 全局安装包时,不晓得为什么就报 npm ERR! Error: EPERM: operation not permitted, npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘rename’
看意思是重命名权限不够
我更改权限不行
清理缓存: npm cache clean –force 也不行
把nodejs 版本换了, 天然外面的npm 版本也换了, 还是不行
又把所有的对于npm 的目录都设置成了管理员权限,也不行
波及自定义的npm_global , npm_cache 目录
起初看到下面的 : npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\Administrator.config
故把npm 降级了下: npm install npm -g 从v6.14.5 降级到 v7.22.0
竟然好了
乖乖,竟然是npm 版本有问题了
接着能够装cnpm @vue/cli , 再用@vue/cli 创立我的项目 vue create programName