npm ERR! enoent ENOENT: no such file or directory, rename

简介: npm ERR! enoent ENOENT: no such file or directory, rename

具体错误

$ sudo npm install -g npm
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine npm@9.2.0: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine npm@9.2.0: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (currnpm WARN install:@colors/colors@1.5.0 ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@colors/colors-c8990a6d' -> '/usr/local/lib/node_modules/npm/node_modules/@colors/colors'
/usr/local/lib
└── (empty)
npm ERR! Linux 5.4.0-84-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "npm"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/@gar/promisify-ebaab35a
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@gar/promisify-ebaab35a' -> '/usr/local/lib/node_modules/npm/node_modules/@gar/promisify'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/@gar/promisify-ebaab35a' -> '/usr/local/lib/node_modules/npm/node_modules/@gar/promisify'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 
npm ERR! Please include the following file with any support request:
npm ERR!     /home/tsit/npm-debug.log
npm ERR! code 1


解决办法

最近跟元心合作,他们给出了一个不可思议的办法。


元心系统SyberH开发环境搭建_柳鲲鹏的博客-CSDN博客

sudo apt install -y aptitude
sudo aptitude install npm
# 先n再y
sudo npm install -g yarn
sudo npm install -g n
sudo n v10.16.2
目录
相关文章
|
3月前
|
缓存 资源调度
解决安装依赖时报错:npm ERR! code ERESOLVE
解决安装依赖时报错:npm ERR! code ERESOLVE
790 0
解决安装依赖时报错:npm ERR! code ERESOLVE
|
5月前
|
小程序
wepy踩坑-npm ERR! cb() never called!
wepy踩坑-npm ERR! cb() never called!
60 0
|
21天前
|
缓存
npm install 报 npm ERR! cb()never called!的错误
npm install 报 npm ERR! cb()never called!的错误
14 0
|
7月前
npm install 报错 npm ERR! puppeteer@1.20.0 install: `node install.js`
npm install 报错 npm ERR! puppeteer@1.20.0 install: `node install.js`
182 0
|
8月前
|
资源调度
npm i时报错npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving
npm i时报错npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving
153 0
|
5月前
|
缓存
【已解决】npm安装依赖报错: npm ERR! cb() never called! npm ERR! This is an error with npm itself.
【已解决】npm安装依赖报错: npm ERR! cb() never called! npm ERR! This is an error with npm itself.
324 0
|
1月前
|
JavaScript 网络安全 数据安全/隐私保护
【问题:创建Vue项目】npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR!
【问题:创建Vue项目】npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR!
|
4月前
npm ERR! code ERR_STREAM_WRITE_AFTER_END npm ERR! write after en
npm ERR! code ERR_STREAM_WRITE_AFTER_END npm ERR! write after en
|
4月前
npm ERR! code ENOENT npm ERR! syscall open npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file
npm ERR! code ENOENT npm ERR! syscall open npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file
|
4月前
Error:npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\XX\package.json‘son‘
Error:npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\XX\package.json‘son‘

推荐镜像

更多