npm 镜像等常见问题

node -v
14.18.2

#查看当前npm镜像地址
npm config get registry
https://registry.npmjs.org/
#设置镜像地址为:淘宝镜像
npm config set registry https://registry.npm.taobao.org

# 全局安装nrm (mac需要加上sudo)
npm install -g nrm

1.  npm install    或者  npm i
    安装个别包(npm i v-charts echarts@4.9.0 -S 或者 npm install --save easy-player 或者 npm install easy-player --save)
2.  如果没有报错的话 npm run dev 或者  npm start(有报错结局报错)
    运行查看:package.json文件("dev": "npm run serve")
3.打包命令  npm run build   --生成dist文件

安装:nrm
npm install nrm -g

有效:
启动报错:A new version of sass-loader is available. Please upgrade for best experienc
解决方案:
npm i sass-loader
npm i sass-loader autoprefixer@8.0.0
npm i eslint-loader
npm i babel-eslint

无效:
https://blog.csdn.net/palmer_kai/article/details/105558253
启动报错:A new version of sass-loader is available. Please upgrade for best experienc
解决方案:
npm i autoprefixer@latest
npm i caniuse-lite@latest
npm i caniuse-lite browserslistal@test

4.安装失败:
C:\Users\yhtyzx\AppData\Roaming\npm-cache\node-sass\4.14.1
win32-x64-72_binding.node

5.eachar安装失败:
To install it, you can run: npm install --save v-charts echarts@4.9.0/src/util/main
解决方案:页面写错误,不存在echarts@4.9.0/src/util/main安装模块


6.npm遇到的问题:
To install it, you can run: npm install --save easy-player
解决方案:npm install --save easy-player
To install it, you can run: npm install --save axios
解决方案:npm install --save axios

7.失败:- "python2.6.0" is not in PATH or produced an error
-- 因为python2.6.0是2008年
npm config set python python2.6.0
npm config set msvs_version 2008

失败:- "python2.7.0" is not in PATH or produced an error
-- 因为python2.7.0是2017年
npm config set python python2.7.0
npm config set msvs_version 2017

atom
中文插件:simplified-chinese-menu


2021.12.10
1安装.  npm install    或者  npm i
2运行.  如果没有报错的话 npm run serve 或者  npm start

2022.01.23
npm start

npm uninstall node-sass
npm install node-sass --save-dev

npm uninstall node-loader
-- 安装sass-loader的7.0.0版本
npm install sass-loader@7.0.0 --save-dev

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值