【nodejs】win10-nodejs安装&配置&错误解决

在Win10上安装Node.js并配置时,博主遇到了在安装Express时的报错。通过以管理员身份运行cmd解决了问题。过程中尝试了修改文件夹权限、清除npm缓存、删除.npmrc文件等方法,最终发现是环境变量配置的问题。通过重新配置并搜索错误代码找到了解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我按照一个博主的方法进行了nodejs的安装以及配置,过程很详细,以下是博主的链接。
win10安装nodejs以及配置

在最后进行安装express时出现了报错,以下是记录:

C: \Users \Lenovo>npm install express -g
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D: \web_ tool \node js \node_ cache\ cacache
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir D: \web_ tool \node js \node_ cache _ cacache'
npm ERR!
LError: EPERM: operation not permitted, mkdir D: web_ tool \node js \node_ cache\ cacache 」t
npm ERR
errno:, -4048,
npm ERR
code:
EPERM’
npm ERR
syscall:’ mkdir'
npm ERR !
path:’D: \web_ tool \ \node js \ \node_ cache\_ cacache' ,
npm ERR
requiredBy :
npm ERR!
npm ERR !
npm ERR! The operation was re jected 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 
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值