【发布时间】:2021-06-24 13:12:20
【问题描述】:
npm run build 错误!
我尝试了这个问题的所有解决方案,但仍然无法解决这个问题。很多时候我重新安装 npm 但没有得到正确的解决方案 (Laravel 8 和 Vue js) enter image description here
我的 package.json 代码
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"devDependencies": {
"@webpack-cli/init": "^1.1.3",
"axios": "^0.21.1",
"babel-loader": "^8.2.2",
"bootstrap": "^4.6.0",
"jquery": "^3.6",
"laravel-mix": "^6.0.13",
"lodash": "^4.17.21",
"popper.js": "^1.12",
"postcss": "^8.2.8",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.8",
"sass-loader": "^11.0.1",
"vue": "^2.6.12",
"vue-loader": "^15.9.6",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0"
},
"dependencies": {
"vue": "^2.6.12",
"vue-router": "^3.5.1"
}
}
【问题讨论】:
-
运行此命令
npm install -g @vue/cli或update -g @vue/cli -
两个命令都试过了,还是一样的问题