将vue.js部署到heroku时会遇到一些麻烦

时间:2018-05-30 19:11:33

标签: heroku vue.js

我尝试将spring-boot web-application和vue-cli部署为前端。 春天没有问题。

node build / build.js存在问题。

github上的

链接 - https://github.com/stepan09/courseworkSV

有我的构建日志。

[INFO] Running 'npm install' in /tmp/build_31b7d0935e35bcd3ec6a6bff51ee1bad/sport-app
   [WARNING] npm WARN bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
   [ERROR] 
   [INFO] up to date in 2.729s
   [INFO] 
   [INFO] --- frontend-maven-plugin:1.6:npm (npm run build) @ sport-app ---
   [INFO] Running 'npm run build' in /tmp/build_31b7d0935e35bcd3ec6a6bff51ee1bad/sport-app
   [INFO] 
   [INFO] > sport-app@1.0.0 build /tmp/build_31b7d0935e35bcd3ec6a6bff51ee1bad/sport-app
   [INFO] > node build/build.js
   [INFO] 
   [ERROR] internal/modules/cjs/loader.js:550
   [ERROR]     throw err;
   [ERROR]     ^
   [ERROR] 
   [ERROR] Error: Cannot find module 'chalk'
   [ERROR]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
   [ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:475:25)
   [ERROR]     at Module.require (internal/modules/cjs/loader.js:598:17)
   [ERROR]     at require (internal/modules/cjs/helpers.js:11:18)
   [ERROR]     at Object.<anonymous> (/tmp/build_31b7d0935e35bcd3ec6a6bff51ee1bad/sport-app/build/check-versions.js:2:15)
   [ERROR]     at Module._compile (internal/modules/cjs/loader.js:654:30)
   [ERROR]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
   [ERROR]     at Module.load (internal/modules/cjs/loader.js:566:32)
   [ERROR]     at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
   [ERROR]     at Function.Module._load (internal/modules/cjs/loader.js:498:3)
   [ERROR] npm ERR! code ELIFECYCLE
   [ERROR] npm ERR! errno 1
   [ERROR] npm ERR! sport-app@1.0.0 build: `node build/build.js`
   [ERROR] npm ERR! Exit status 1
   [ERROR] npm ERR! 
   [ERROR] npm ERR! Failed at the sport-app@1.0.0 build script.
   [ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   [ERROR] 
   [ERROR] npm ERR! A complete log of this run can be found in:
   [ERROR] npm ERR!     /app/.npm/_logs/2018-05-30T18_07_35_898Z-debug.log
   [INFO] ------------------------------------------------------------------------
   [INFO] Reactor Summary:
   [INFO] 
   [INFO] coursework ......................................... SUCCESS [  2.843 s]
   [INFO] sport-app .......................................... FAILURE [ 15.478 s]
   [INFO] sport .............................................. SKIPPED
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 20.496 s
   [INFO] Finished at: 2018-05-30T18:07:35+00:00
   [INFO] Final Memory: 34M/269M
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm run build) on project sport-app: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please read the following articles:
   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
   [ERROR] 
   [ERROR] After correcting the problems, you can resume the build with the command
   [ERROR]   mvn <goals> -rf :sport-app

!错误:无法使用Maven构建应用程序        抱歉,这个版本失败了!如果在应用程序代码中找不到问题,        请提交一张票,以便我们提供帮助:https://help.heroku.com/  !推送被拒绝,无法编译Java应用程序。  !推送失败

1 个答案:

答案 0 :(得分:0)

删除'yarn.lock'对我有用

相关问题