目录
1.官方下载🍟🍟🍟
官方地址:快点啊~我的小宝贝儿
2.骚操作来了 🍟🍟🍟
双击安装包,一路通关到最后哦~,难不到你的~~~
- 1.在node文件夹里新建文件夹 node_cache和node_global
- 2.使用命令配置
npm config set prefix "E:\node\node_global"
npm config set cache "E:\node\node_cache "
3.变量环境🍟🍟🍟
- 1.添加环境变量
- 2.添加到path
4.查看node 🍟🍟🍟
- 1.使用命令查看
node -v
npm -v
5.安装cnpm🍟🍟🍟
直接安装对应版本~
npm install cnpm@7.1.0 -g
如果不听劝可能报下面错误!!!!!!!!!!!!!!!!!!!!!
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli
npm ERR! dest C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\.make-fetch-happen.DELETE\node_modules\@npmcli' -> 'C:\Users\admin\AppData\Roaming\nvm\v14.21.3\node_modules\cnpm\node_modules\make-fetch-happen\node_modules\@npmcli'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\admin\\AppData\\Roaming\\nvm\\v14.21.3\\node_modules\\cnpm\\node_modules\\.make-fetch-happen.DELETE\\node_modules\\@npmcli',
npm ERR! dest: 'C:\\Users\\admin\\AppData\\Roaming\\nvm\\v14.21.3\\node_modules\\cnpm\\node_modules\\make-fetch-happen\\node_modules\\@npmcli'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\admin\\AppData\\Roaming\\nvm\\v14.21.3\\node_modules\\cnpm\\node_modules\\.make-fetch-happen.DELETE\\node_modules\\@npmcli',
npm ERR! dest: 'C:\\Users\\admin\\AppData\\Roaming\\nvm\\v14.21.3\\node_modules\\cnpm\\node_modules\\make-fetch-happen\\node_modules\\@npmcli',
npm ERR! parent: 'cnpm'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2023-12-29T07_52_50_909Z-debug.log
你还真是头倔驴,不撞南墙不回头啊~有志气!!!