我正在使用JHipster 5.3.4。生产版本产生以下错误。我已经清除了所有软件包并重新安装了它们。它仍然产生错误。 'dev'构建正常。它仅在升级到新版本的JHipster v5.3.4之后出现。我不知道是什么原因引起的。
它首先产生此错误:'[ERROR](节点:9240)DeprecationWarning:不推荐使用Tapable.plugin。采用
.hooks
上的新API代替。”
[INFO] > node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js
"--config" "webpack/webpack.prod.js" "--profile"
[ERROR] (node:9240) DeprecationWarning: Tapable.plugin is deprecated. Use
new API on `.hooks` instead
[ERROR] Error: Parse error on line 1:
[ERROR] (* 1.25) + 4px
[ERROR] Expecting 'SUB', 'LPAREN', 'NESTED_CALC', 'NUMBER', 'CSS_VAR',
'LENGTH', 'ANGLE', 'TIME', 'FREQ', 'RES', 'EMS', 'EXS', 'CHS', 'REMS',
'VHS', 'VWS', 'VMINS', 'VMAXS', 'PERCENTAGE', got 'MUL'
[ERROR] at Parser.parseError (D:\Projects\arif\fb-
quiz\node_modules\cssnano-preset-default\node_modules\reduce-css-
calc\dist\parser.js:160:21)
[ERROR] at Parser.parse (D:\Projects\arif\fb-quiz\node_modules\cssnano-
preset-default\node_modules\reduce-css-calc\dist\parser.js:226:22)
[ERROR] at D:\Projects\arif\fb-quiz\node_modules\cssnano-preset-
default\node_modules\reduce-css-calc\dist\index.js:35:30
[ERROR] at walk (D:\Projects\arif\fb-quiz\node_modules\postcss-value-
parser\lib\walk.js:15:13)
[ERROR] at ValueParser.walk (D:\Projects\arif\fb-
quiz\node_modules\postcss-value-parser\lib\index.js:18:5)
[ERROR] at exports.default (D:\Projects\arif\fb-
quiz\node_modules\cssnano-preset-default\node_modules\reduce-css-
calc\dist\index.js:29:51)
[ERROR] at transformValue (D:\Projects\arif\fb-
quiz\node_modules\cssnano-preset-default\node_modules\postcss-
calc\dist\lib\transform.js:24:45)
[ERROR] at exports.default (D:\Projects\arif\fb-
quiz\node_modules\cssnano-preset-default\node_modules\postcss-
calc\dist\lib\transform.js:54:100)
[ERROR] at D:\Projects\arif\fb-quiz\node_modules\cssnano-preset-default\node_modules\postcss-calc\dist\index.js:28:52
[ERROR] at D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:144:26
[ERROR] at Rule.each (D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:110:22)
[ERROR] at Rule.walk (D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:143:21)
[ERROR] at D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:146:32
[ERROR] at Root.each (D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:110:22)
[ERROR] at Root.walk (D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\postcss\lib\container.js:143:21)
[ERROR] at D:\Projects\arif\fb-quiz\node_modules\cssnano-preset-default\node_modules\postcss-calc\dist\index.js:25:9
[ERROR] at initializePlugin (D:\Projects\arif\fb-quiz\node_modules\optimize-css-assets-webpack-plugin\node_modules\cssnano\dist\index.js:35:51)
[ERROR] at <anonymous>
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 1
[ERROR] npm ERR! fb-quiz@0.0.0 webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.prod.js" "--profile"
[ERROR] npm ERR! Failed at the fb-quiz@0.0.0 webpack script.
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 1
[ERROR] npm ERR! fb-quiz@0.0.0 webpack:prod:main: `npm run webpack -- --config webpack/webpack.prod.js --profile`
[ERROR] npm ERR! Failed at the fb-quiz@0.0.0 webpack:prod:main script.
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 1
[ERROR] npm ERR! fb-quiz@0.0.0 webpack:prod: `npm run cleanup && npm run webpack:prod:main && npm run clean-www`
[ERROR] npm ERR! Failed at the fb-quiz@0.0.0 webpack:prod script.
[INFO] BUILD FAILURE
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (webpack build prod) on project fb-quiz: Failed to run task: 'npm run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1
答案 0 :(得分:0)
我不会注意弃用警告,这只是一个警告,[ERROR]前缀没有任何意义,这是由于maven-frontend-plugin处理输出的方式引起的。
真正的错误是关于CSS解析,搜索(* 1.25) + 4px
,运行stylelint或其他CSS linter来检测错误。您自己的CSS规则或在依赖项中导入的CSS规则一定有问题。