报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

简介: 报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

@[toc]

报错

在这里插入图片描述

解决方案

  1. 打开node.js安装目录,找到npm.cmd文件
    在这里插入图片描述
    在这里插入图片描述

  2. 将文件里的 prefix-g 改为 prefix --location=global
    在这里插入图片描述

  3. 测试一下
    在这里插入图片描述
相关文章
|
5天前
|
网络安全 计算机视觉
【node】 npm install 报错:code 128
【node】 npm install 报错:code 128
41 1
|
5天前
webpack.config.js配置文件报错:The ‘mode‘ option has not been set
webpack.config.js配置文件报错:The ‘mode‘ option has not been set
17 0
|
5天前
|
Linux
npm install 报错ERESOLVE unable to resolve dependency tree
npm install 报错ERESOLVE unable to resolve dependency tree
17 0
|
5天前
项目打包报错“caniuse-lite is outdated. Please run next command `npm update`”的解决方案
项目打包报错“caniuse-lite is outdated. Please run next command `npm update`”的解决方案
59 1
|
5天前
|
Linux 网络安全
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
linux免密登录报错 Bad owner or permissions on /etc/ssh/ssh_config.d/05-redhat.conf
36 1
|
5天前
|
安全 网络安全 数据安全/隐私保护
/etc/ssh/sshd_config line 142: Deprecated option RSAAuthentication 是什么
【5月更文挑战第6天】/etc/ssh/sshd_config line 142: Deprecated option RSAAuthentication 是什么
38 4
|
5天前
npm报错:npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED,npm ERR! npm ERR! If you are behind a
npm报错:npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED,npm ERR! npm ERR! If you are behind a
|
5天前
|
弹性计算 Dubbo Serverless
Serverless 应用引擎操作报错合集之阿里函数计算中配置完fc,出现‘Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'npm run start '. 报错如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
26 5
|
5天前
|
JavaScript
npm报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
17 1
|
5天前
|
缓存 网络虚拟化
解决 npm install 报错的常见问题
解决 npm install 报错的常见问题
407 0

热门文章

最新文章

推荐镜像

更多