无法将Angular Bootstrap模板安装到Heroku

时间:2019-07-17 00:28:38

标签: angular heroku bootstrap-4 angular-ui-bootstrap

我现在拥有三连胜新手状态-Angular,Bootstrap和Heroku的新手。我希望没有启动VPS,而是希望建立一个引导仪表板并在诸如Heroku之类的PaaS平台上运行,但我一直遇到问题并陷入困境。

我尝试了以下2种方法,但均未成功: https://github.com/coreui/coreui-free-bootstrap-admin-template https://dashboardpack.com/theme-details/architectui-angular-7-dashboard-free/

我已经完成了一个干净的github存储库,按照Heroku的说明编辑了文件,但是无法运行仪表板。

我的Procfile具有:

web: npm run serve

它可以编译,但是当我运行时我得到: 应用程序错误 应用程序中发生错误,无法提供您的页面。如果您是应用程序所有者,请检查日志以获取详细信息。您可以使用以下命令从Heroku CLI执行此操作 heroku日志--tail

我在日志中看到的只是:

2019-07-17T00:12:39.759322+00:00 app[web.1]: npm ERR! @coreui/coreui-free-bootstrap-admin-template@2.1.15 serve: `npm-run-all --parallel localhost watch-css watch-js`
2019-07-17T00:12:39.759477+00:00 app[web.1]: npm ERR! spawn ENOENT
2019-07-17T00:12:39.759689+00:00 app[web.1]: npm ERR! 
2019-07-17T00:12:39.759780+00:00 app[web.1]: npm ERR! Failed at the @coreui/coreui-free-bootstrap-admin-template@2.1.15 serve script.
2019-07-17T00:12:39.759843+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-07-17T00:12:39.768951+00:00 app[web.1]: 
2019-07-17T00:12:39.769077+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-07-17T00:12:39.769132+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-07-17T00_12_39_761Z-debug.log
2019-07-17T00:12:42.854099+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=test-angular.herokuapp.com request_id=8a5d3c7e-f723-4d05-a2fc-922f36a411d4 fwd="x.x.x.166" dyno= connect= service= status=503 bytes= protocol=https
2019-07-17T00:12:47.770113+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=test-angular.herokuapp.com request_id=0020fd45-ccc7-4d44-9818-33b9caf4b105 fwd="x.x.x.166" dyno= connect= service= status=503 bytes= protocol=https

详细日志:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/app/.heroku/node/bin/node',
1 verbose cli   '/app/.heroku/node/bin/npm',
1 verbose cli   'run',
1 verbose cli   'serve'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.6.0
4 verbose config Skipping project config: /app/.npmrc. (matches userconfig)
5 verbose run-script [ 'preserve', 'serve', 'postserve' ]
6 info lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~preserve: @coreui/coreui-free-bootstrap-admin-template@2.1.15
7 info lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: @coreui/coreui-free-bootstrap-admin-template@2.1.15
8 verbose lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: unsafe-perm in lifecycle true
9 verbose lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: PATH: /app/.heroku/node/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/app/node_modules/.bin:/app/.heroku/node/bin:/app/.heroku/yarn/bin:/usr/local/bin:/usr/bin:/bin:/app/bin:/app/node_modules/.bin
10 verbose lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: CWD: /app
11 silly lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: Args: [ '-c', 'npm-run-all --parallel localhost watch-css watch-js' ]
12 info lifecycle @coreui/coreui-free-bootstrap-admin-template@2.1.15~serve: Failed to exec serve script
13 verbose stack Error: @coreui/coreui-free-bootstrap-admin-template@2.1.15 serve: `npm-run-all --parallel localhost watch-css watch-js`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/app/.heroku/node/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
13 verbose stack     at ChildProcess.emit (events.js:203:13)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid @coreui/coreui-free-bootstrap-admin-template@2.1.15
15 verbose cwd /app
16 verbose Linux 4.4.0-1046-aws
17 verbose argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "run" "serve"
18 verbose node v12.6.0
19 verbose npm  v6.9.0
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error @coreui/coreui-free-bootstrap-admin-template@2.1.15 serve: `npm-run-all --parallel localhost watch-css watch-js`
24 error spawn ENOENT
25 error Failed at the @coreui/coreui-free-bootstrap-admin-template@2.1.15 serve script.
25 error This is probably not a problem with npm. There is likely additional logging output above.
26 verbose exit [ 1, true ]
~ $ ```

0 个答案:

没有答案