请求vuepress启动报错解决方案?

新手上路,请多包涵

安装了个vuepress,运行的时候直接报错
image.png
百度了半天又说webpack降级的(我是webpack5),降级确实好使了但是@vue/cli这些又是5的版本,vuepress是不报错了,但是npm run serve的时候又报错了。而且我弄了个新工程安装webpack5也是能启动vuepress的。所以这到底是啥原因
附上依赖版本号

 "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^2.7.10"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^8.2.5",
    "babel-preset-env": "^1.7.0",
    "babel-plugin-import": "^1.13.5",
    "babel-plugin-module-resolver": "^4.1.0",
    "clean-webpack-plugin": "^4.0.0",
    "cross-env": "^7.0.3",
    "css-loader": "^3.6.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "gulp": "^4.0.2",
    "gulp-minify-css": "^1.2.4",
    "gulp-sass": "^5.1.0",
    "html-withimg-loader": "^0.1.16",
    "sass": "^1.53.0",
    "node-sass": "^6.0.1",
    "sass-loader": "^10.2.1",
    "vant": "^2.12.48",
    "vue-loader": "^15.10.0",
    "vue-template-compiler": "^2.7.10",
    "vuepress": "^1.9.7",
    "webpack": "^5.73.0",
    "webpack-cli": "^4.10.0"
  },

新工程不报错

 "dependencies": {
    "core-js": "^3.8.3",
    "vue": "^2.6.14"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-vue": "^8.0.3",
    "vue-template-compiler": "^2.6.14",
    "vuepress": "^1.9.7",
    "webpack": "^5.74.0",
    "webpack-cli": "^4.10.0"
  },
阅读 1.9k
1 个回答
新手上路,请多包涵

利用排除法发现是vue-loader的问题

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题