nodes npm对应版本
启动vue项目
注意:Node.js Version(v20.18.0)对应的npm版本(v10.8.2)
1、安装nodejs
前往node官网下载安装包,nodejs安装成功,npm也会自动安装。
2、检查安装是否成功
安装完成后,运行node -v和npm -v检查是否安装成功。
3、设置淘宝镜像(非必须)
设置官网镜像
npm config set registry https://registry.npmjs.org/
设置淘宝镜像
npm config set registry https://registry.npm.taobao.org
查看当前使用的镜像地址:npm config get registry
4、配置npm的全局模块存放路径和缓存路径
npm config set prefix "D:\dev\node_global"
npm config set cache "D:\dev\node_cache"
5、测试安装
通过命令npm install express -g测试安装是否成功。
6、安装pnpm
npm install pnpm -g
pnpm -v
卸载pnpm
npm uninstall -g pnpm
先把node_modules 文件删掉,然后把package.jsos替换一下,然后使用npm i安装一下安装完成后使用npm run serve 运行
node 记得重新安装一下要14.21.3
{
"name": "vue-antd-jeecg",
"version": "2.4.5",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
"serve": "vue-cli-service serve",
"build:test": "vue-cli-service build --mode test",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@antv/data-set": "^0.11.4",
"@jeecg/antd-online-mini": "2.4.5-RC",
"@tinymce/tinymce-vue": "^2.1.0",
"@toast-ui/editor": "^2.1.2",
"address-smart-parse": "^1.0.0",
"ant-design-vue": "^1.7.2",
"area-data": "^5.0.6",
"axios": "^0.18.0",
"clipboard": "^2.0.4",
"codemirror": "^5.46.0",
"cron-parser": "^2.10.0",
"crypto-js": "^4.1.1",
"dayjs": "^1.8.0",
"dom-align": "1.12.0",
"enquire.js": "^2.1.6",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"pinyin-match": "^1.2.2",
"tinymce": "^5.3.2",
"viser-vue": "^2.4.8",
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.7.0",
"vue-infinite-scroll": "^2.0.2",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-photo-preview": "^1.1.3",
"vue-print-nb-jeecg": "^1.0.9",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
"vuex": "^3.1.0",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"xe-utils": "2.4.8"
},
"devDependencies": {
"@babel/core": "^7.25.9",
"@babel/polyfill": "^7.2.5",
"@babel/preset-env": "^7.25.9",
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "7.2.3",
"babel-loader": "^9.2.1",
"cache-loader": "^4.1.0",
"compression-webpack-plugin": "^3.1.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.1.0",
"html-webpack-plugin": "^4.2.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/strongly-recommended",
"@vue/standard"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"generator-star-spacing": "off",
"no-mixed-operators": 0,
"vue/max-attributes-per-line": [
2,
{
"singleline": 5,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}
],
"vue/attribute-hyphenation": 0,
"vue/html-self-closing": 0,
"vue/component-name-in-template-casing": 0,
"vue/html-closing-bracket-spacing": 0,
"vue/singleline-html-element-content-newline": 0,
"vue/no-unused-components": 0,
"vue/multiline-html-element-content-newline": 0,
"vue/no-use-v-if-with-v-for": 0,
"vue/html-closing-bracket-newline": 0,
"vue/no-parsing-error": 0,
"no-tabs": 0,
"indent": [
"off",
2
],
"no-console": 0,
"space-before-function-paren": 0
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 10"
]
}