无法在生产服务器上运行`npm run prod`。 Chunk.entrypoints错误即将到来

时间:2019-02-08 12:27:09

标签: reactjs webpack laravel-mix

npm run prod命令未在生产服务器上运行。 我的配置是:

node version v10.9.0 npm version 6.2.0

这是错误

Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead at Chunk.get (/home/ubuntu/node_modules/webpack/lib/Chunk.js:849:9) at /home/ubuntu/warehouse/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:176:48 at Array.forEach (<anonymous>) at /home/ubuntu/warehouse/node_modules/laravel-mix/node_modules/extract-text-webpack-plugin/dist/index.js:171:18 at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/ubuntu/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:7:1) at AsyncSeriesHook.lazyCompileHook (/home/ubuntu/node_modules/tapable/lib/Hook.js:154:20) at Compilation.seal (/home/ubuntu/node_modules/webpack/lib/Compilation.js:1244:27) at hooks.make.callAsync.err (/home/ubuntu/node_modules/webpack/lib/Compiler.js:624:17) at _err0 (eval at create (/home/ubuntu/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1) at _addModuleChain (/home/ubuntu/node_modules/webpack/lib/Compilation.js:1095:12) at processModuleDependencies.err (/home/ubuntu/node_modules/webpack/lib/Compilation.js:1007:9) at process._tickCallback (internal/process/next_tick.js:61:11)

这是package.json

的代码

{ "private": true, "scripts": { "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18.0", "babel-plugin-import": "^1.11.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-preset-env": "^1.7.0", "babel-preset-react": "^6.24.1", "babel-preset-stage-1": "^6.24.1", "bootstrap": "^4.0.0", "compression-webpack-plugin": "^2.0.0", "cross-env": "^5.1", "jquery": "^3.2", "laravel-mix": "^2.0", "lodash": "^4.17.11", "popper.js": "^1.12", "react": "^16.2.0", "react-dom": "^16.2.0" }, "eslintConfig": { "extends": "react-app", "parser": "babel-eslint" }, "dependencies": { "antd": "^3.10.2", "babel-core": "^6.26.3", "babel-eslint": "^10.0.1", "babel-plugin-syntax-dynamic-import": "^6.18.0", "eslint-config-react-app": "^3.0.4", "eslint-plugin-import": "^2.14.0", "moment": "^2.22.2", "qs": "^6.5.2", "query-string": "^6.2.0", "rc-table": "^6.4.2", "react-loadable": "^5.5.0", "react-redux": "^5.0.7", "react-router-dom": "^4.3.1", "react-router-redux": "^5.0.0-alpha.9", "react-scripts": "^2.0.5", "redux": "^4.0.1", "redux-thunk": "^2.3.0", "styled-components": "^4.0.2" } }

这是Webpack enter image description here

错误消息 enter image description here

0 个答案:

没有答案