0

从昨天开始我一直在努力解决编译错误有人遇到过这个问题吗?

[Webpacker] Compilation failed:
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.

这是我的 package.json

{
  "name": "xxx",
  "private": true,
  "dependencies": {
    "@rails/webpacker": "3.5",
    "@zxing/library": "^0.12.3",
    "babel-loader": "^8.2.3",
    "bootstrap": "3",
    "chart.js": "^2.7.3",
    "chartjs-plugin-datalabels": "^0.5.0",
    "flatpickr": "^4.5.2",
    "jquery": "^3.5.1",
    "jquery-ujs": "^1.2.2",
    "markdown": "^0.5.0",
    "moment": "^2.22.2",
    "node-sass": "4.14",
    "redis": "^3.1.2",
    "select2": "^4.0.13",
    "sortablejs": "^1.10.1",
    "webpack": "^5.65.0",
    "webpack-cli": "^4.9.1",
    "webpack-dev-server": "^4.7.0",
    "yarn": "^1.22.17"
  },
  "devDependencies": {}
}

此外,它正在犯错误 500 :

Webpacker::Manifest::MissingEntryError

Webpacker can't find application.css in /Users/daniaaflak/code/DaniaAf/good_meal/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
   unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
  "application.js": "/packs/application-ab346b598de8db44a04b.js",
  "application.js.map": "/packs/application-ab346b598de8db44a04b.js.map"
}

在此处输入图像描述

4

0 回答 0