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