当前位置:网站首页>安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
2022-06-28 08:06:00 【庸懒】
最近需要切换不同的npm源,因为有私有的,如果重新配就很麻烦,然后我安装了一个nrm,但是在安装完毕运行的时候报错了。错误如图所示:
这个时候得先检查node、npm有没有问题,如果没有问题的话再看这一行错误at Object.<anonymous> (D:\Node.js\node_global\node_modules\nrm\cli.js:17:20)
然后根据这个路径打开cli.js文件,就是下面第三行的js文件
根据报错可以知道是第17行出了问题,这时候需要将17行的代码换成下面的代码:
// const NRMRC = path.join(process.env.HOME, '.nrmrc');
const NRMRC = path.join(process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'], '.nrmrc');
这个时候在打开cmd输入nrm ls就可以看到出现了相关源的信息
边栏推荐
- 【学习笔记】拟阵
- MySQL implements transaction persistence using redo logs
- Generation and verification of JWT token
- App automated testing appium tutorial 2 - ADB command
- Redis master-slave structure and application scenarios
- Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
- Activity implicit jump
- Today's notes 22/1/7
- Estimation of SQL execution cost by MySQL query optimizer
- Host is not allowed to connect to this MySQL server
猜你喜欢

Introduction to Devops Basics

Idea package together, using compact middle packages to solve &

Kubernetes cluster command line tool kubectl

ROS notes (08) - definition and use of service data

Ambari (VII) --- ambari integrated hue4.2 document (valid for personal test)

AI首席架构师8-AICA-高翔 《深入理解和实践飞桨2.0》

Do you know TCP protocol (2)?

sql主从复制搭建

你了解TCP协议吗(二)?

Eslint syntax monitoring off
随机推荐
ROS notes (09) - query and setting of parameters
SOC clock configuration
软件测试与质量期末复习
B_QuRT_User_Guide(29)
SLAM中常用的雅克比矩阵J
Section 9: dual core startup of zynq
Activity隐式跳转
Prometheus service discovery
Study notes 22/1/17
[JS] - [throttling and anti shake function]
Unity 获取当前物体正前方,一定角度、距离的坐标点
Section Xi. Axi of zynq_ Use of DMA
SQL master-slave replication setup
Jacobian matrix J commonly used in slam
sql主從複制搭建
Conversion between HJ integer and IP address
2022巴黎时装周儿童单元6.19武汉站圆满落幕
Prometheus deployment alarm docking QQ mailbox
Trigonometric transformation formula
【学习笔记】线性基