JHipster - 纱线构建失败

Manuela CodingPadawan

使用 Jhipster v5.0.1 和 Angular v6.0.0

目标

我想做一个纱线构建,以便将我的 scss 文件考虑在内,但它失败了:

在终端:

C:\Users\clari\Documents\ManuelaTechValley\crafrontmanu>yarn build
yarn run v1.5.1
$ yarn run webpack:prod
$ yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www
$ rimraf target/{aot,www}
'rimraf' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c rimraf target/{aot,www}
Directory: C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

在纱线错误中:

Trace: 
  Error: Command failed.
  Exit code: 1
  Command: C:\WINDOWS\system32\cmd.exe
  Arguments: /d /s /c yarn run webpack:prod
  Directory: C:\Users\clari\Documents\Manuela\crafrontmanu
  Output:

      at ProcessTermError.MessageError (C:\Program Files (x86)\Yarn\lib\cli.js:186:110)
      at new ProcessTermError (C:\Program Files (x86)\Yarn\lib\cli.js:226:113)
      at ChildProcess.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:30281:17)
      at ChildProcess.emit (events.js:180:13)
      at maybeClose (internal/child_process.js:936:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

编辑 1:

我发现了这个问题。https://github.com/yarnpkg/yarn/issues/5481我想知道这是否是我的问题,它没有找到一些构建依赖项的原因。我有 1.5.1 版,但如果我尝试更新,我的终端回答已经是最新的...

编辑 2:

我抑制了所有节点模块并再次安装了纱线。rimraf 问题不再存在。但是,它仍然不起作用。

    Trace: 
  Error: Command failed.
  Exit code: 1
  Command: C:\WINDOWS\system32\cmd.exe
  Arguments: /d /s /c yarn run webpack:prod
  Directory: C:\Users\clari\Documents\Manuela\crafrontmanu
  Output: ".

  at ProcessTermError.MessageError (C:\Program Files (x86)\Yarn\lib\cli.js:186:110)
  at new ProcessTermError (C:\Program Files (x86)\Yarn\lib\cli.js:226:113)
  at ChildProcess.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:30281:17)
  at ChildProcess.emit (events.js:180:13)
  at maybeClose (internal/child_process.js:936:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)


C:\Users\clari\Documents\Manuela\crafrontmanu>yarn build
yarn run v1.5.1
$ yarn run webpack:prod
$ yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www
$ rimraf target/{aot,www}
$ yarn run webpack --config webpack/webpack.prod.js --profile
$ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --profile
(node:12788) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Hash: 83726fc3895998baed92
Version: webpack 4.8.0
Time: 8976ms
Built at: 2018-10-02 15:01:08
 7 assets
Entrypoint polyfills = app/polyfills.83726fc3895998baed92.bundle.js
Entrypoint global = app/global.83726fc3895998baed92.bundle.js content/global.83726fc3895998baed92.css
Entrypoint main = app/main.83726fc3895998baed92.bundle.js
[0] ./src/main/webapp/app/app.main.ts 0 bytes {0} [built]
    factory:4418ms building:4087ms = 8505ms
[1] ./src/main/webapp/app/polyfills.ts 0 bytes {2} [built]
    factory:4418ms building:4072ms = 8490ms
[5] ./node_modules/css-loader!./src/main/webapp/content/css/global.css 2.17 KiB [built]
    [6] -> factory:625ms building:728ms = 1353ms
[6] ./src/main/webapp/content/css/global.css 41 bytes [built]
    + 3 hidden modules


error An unexpected error occurred: "Command failed.
Exit code: 2
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --profile
Directory: C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c yarn run webpack --config webpack/webpack.prod.js --profile
Directory: C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www
Directory: C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: C:\\WINDOWS\\system32\\cmd.exe
Arguments: /d /s /c yarn run webpack:prod
Directory: C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\clari\\Documents\\Manuela\\crafrontmanu\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

编辑 3:

尝试使用 mvnw Pprod 启动 prod Build。构建也失败。

    [INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:55 min
[INFO] Finished at: 2018-10-02T16:29:48+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project crafrontmanu: Failed to run task: 'yarn run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error:
 1 (Exit value: 1) -> [Help 1]
[ERROR]

编辑 4:

我修复了一些错误。这并没有阻止纱线开始,这就是为什么我之前没有注意它,但它显然阻止了纱线的形成。那么问题就解决了。谢谢你的时间。

谢谢,

摩奴

盖尔·马齐欧

看起来 rimraf 没有在您的项目中本地安装node_modules,所以可能在 yarn install 阶段出现了您没有注意到的错误。

尝试删除node_modules项目中的文件夹,然后运行yarn install并检查node_modules文件夹中是否存在 rimraf 如果没有错误并且丢失了,请检查 rimraf 是否在您的项目中被声明为开发依赖项package.json

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

JHipster Jenkins构建失败

来自分类Dev

JHipster postgresql 连接失败

来自分类Dev

Next.js-“纱线构建”失败

来自分类Dev

在Windows Jenkins中构建jhipster

来自分类Dev

Jhipster博客项目登录失败

来自分类Dev

CORS Origin Spring Boot Jhipster-飞行前失败

来自分类Dev

纱线不会构建项目

来自分类Dev

定制JHipster

来自分类Dev

如何使用Jhipster,Docker,Gitlab和Heroku进行构建,测试和部署

来自分类Dev

如何使用Jhipster,Docker,Gitlab和Heroku进行构建,测试和部署

来自分类Dev

JHipster Prod 版本构建时 Liquibase date_trunc postgresql 函数错误

来自分类Dev

JHipster - 无法在 gradle 构建中使用 liquibase 连接到 dev postgres 数据库

来自分类Dev

映射纱线构建输出以暂存工件

来自分类Dev

第一次运行jhipster应用程序失败,并启动tomcat上下文错误

来自分类Dev

JHipster MongoDB连接授权

来自分类Dev

JHipster-日志文件

来自分类Dev

Jhipster学习语言

来自分类Dev

为JHipster做贡献

来自分类Dev

jhipster会话超时配置

来自分类Dev

无法更新Jhipster版本

来自分类Dev

JHipster MySQL开发中

来自分类Dev

在JHipster中配置JOOQ

来自分类Dev

JHipster编辑蓝图

来自分类Dev

改变jhipster注册端口

来自分类Dev

如何检查JHipster环境

来自分类Dev

jhipster资产的角度

来自分类Dev

从JHipster生成JSX

来自分类Dev

为JHipster做贡献

来自分类Dev

jhipster云铸造图像