执行步骤和问题记录
1、切换nodeJs版本
原nodeJs v15.0.0 切换为nodeJs14.20.0
2、更改node-sass,sass-loader版本
原["node-sass": "^4.14.0","sass-loader": "^7.0.1"] ,变更为新["node-sass": "^4.14.1", "sass-loader": "^7.3.1"]
3、安装依赖 npm install
4、运行 npm run serve
5、WARN:sass-loader@7.3.1 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
执行: npm install webpack@^3.0.0
6、WARN:ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
执行:npm install ajv-keywords@2.1.1
7、sh: vue-cli-service: command not found
执行:
①【npm install vue-cli-service】=》无效
② npm cache clean --force
③ npm install @vue/cli-service
8、Cannot find module '@vue/cli-plugin-babel'
执行:npm install @vue/cli-plugin-babel
9、Cannot find module '@vue/cli-plugin-eslint'
执行:npm install @vue/cli-plugin-eslint
10、Cannot find module 'vue-template-compiler/package.json'
执行:npm install vue-template-compiler
从第4步开始,每次npm install 后都会运行 npm run serve,继而出现下一个步骤的问题。逐步根据出现的问题解决问题后,最后运行npm run serve后打开浏览器http://localhost:8080/。
其中node和node-sass的版本冲突尤为严重。
11、request to https://registry.npm.taobao.org/@progress%2Fkendo-ui failed, reason: getaddrinfo ENOTFOUND registry.npm.taobao.org
执行:npm install @progress/kendo-ui@2020.2.617
12、npm WARN @intervolga/optimize-cssnano-plugin@1.0.6 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @vue/preload-webpack-plugin@1.1.2 requires a peer of webpack@>=4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN css-loader@1.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mini-css-extract-plugin@0.4.5 requires a peer of webpack@^4.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin@1.4.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.7.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.11.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
执行:npm install webpack@4.41.0
13、npm WARN @progress/kendo-spreadsheet-vue-wrapper@2020.3.1217 requires a peer of @progress/kendo-ui@~2020.3.1118 but none is installed. You must install peer dependencies yourself.
npm WARN @progress/kendo-base-components-vue-wrapper@2020.3.1217 requires a peer of @progress/kendo-ui@~2020.3.1118 but none is installed. You must install peer dependencies yourself.
执行:npm install @progress/kendo-ui@~2020.3.1118
扩展
1、先执行这两个命令:设置代理
npm config set proxy null 回车
npm config set https-proxy null 回车
2、再执行: npm config set registry http://registry.cnpmjs.org/ 回车
3、最后执行:npm install -g cnpm --registry=https://registry.npm.taobao.org 回车
4、扩展:删除代理
npm config delete proxy
npm config delete https-proxy
package.json
{
"name": "text",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "cross-env NODE_ENV=production vue-cli-service build",
"lint": "vue-cli-service lint",
"report": "vue-cli-service build --report"
},
"dependencies": {
"@progress/kendo-spreadsheet-vue-wrapper": "^2020.2.827",
"@progress/kendo-ui": "^2020.2.617",
"ant-design-vue": "^1.3.9",
"axios": "^0.18.0",
"cross-env": "^5.2.0",
"element-ui": "^2.12.0",
"file-saver": "^2.0.0",
"highcharts": "^6.2.0",
"jquery": "<=3",
"js-md5": "^0.7.3",
"jszip": "^2.4.0",
"node-rsa": "^1.0.5",
"vue": "^2.5.17",
"vue-clipboard2": "^0.3.0",
"vue-i18n": "^8.15.5",
"vue-router": "3.0.2",
"vuedraggable": "^2.23.2",
"vuex": "^3.0.1",
"xlsx": "^0.14.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.2.0",
"@vue/cli-plugin-eslint": "^3.2.1",
"@vue/cli-service": "^3.2.0",
"ajv": "^5.0.0",
"babel-eslint": "^10.0.1",
"babel-plugin-component": "^1.1.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0-0",
"less": "^3.9.0",
"less-loader": "^5.0.0",
"node-sass": "^4.14.1",
"sass-loader": "^7.3.1",
"vue-template-compiler": "^2.7.8",
"webpack": "^3.0.0"
}
}
浙公网安备 33010602011771号