尝试使用Maven构建有角度的项目会出错

时间:2018-07-10 01:37:21

标签: angular maven spring-boot

我正在尝试使用mvn clean install命令构建一个使用角度和弹簧启动构建的项目。但这会产生以下错误。

[ERROR] npm ERR! Darwin 17.4.0
[ERROR] npm ERR! argv "<project-folder>/target/node/node" "<project-folder>/target/node/node_modules/npm/bin/npm-cli.js" "run" "webpack" "--" "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
[ERROR] npm ERR! node v7.1.0
[ERROR] npm ERR! npm  v3.10.9
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! angular-starter@6.0.0 webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR! 
[ERROR] npm ERR! Failed at the angular-starter@6.0.0 webpack script 'node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[ERROR] npm ERR! If you do, this is most likely a problem with the angular-starter package,
[ERROR] npm ERR! not with npm itself.
[ERROR] npm ERR! Tell the author that this fails on your system:
[ERROR] npm ERR!     node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
[ERROR] npm ERR! You can get information on how to open an issue for this project with:
[ERROR] npm ERR!     npm bugs angular-starter
[ERROR] npm ERR! Or if that isn't available, you can get their info via:
[ERROR] npm ERR!     npm owner ls angular-starter
[ERROR] npm ERR! There is likely additional logging output above.
[ERROR] 
[ERROR] npm ERR! Please include the following file with any support request:
[ERROR] npm ERR!     <project-folder>/client/npm-debug.log
[ERROR] 

当我检查node和npm的版本时,它们与上面的错误消息给出的内容有所不同-它们是最新版本。

node --version
v8.6.0
npm --version
6.1.0

任何帮助都将不胜感激。

0 个答案:

没有答案