Could not find module "@angular-devkit/build-angular" from "/app".
2019-07-01T23:55:03.734820+00:00 app[web.1]: Error: Could not find module "@angular-devkit/build-angular" from "/app".
> i tried to " npm install @angular-devkit/build-angular " and he still crash
2019-07-01T23:55:03.745904+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-07-01T23:55:03.746979+00:00 app[web.1]: npm ERR! Planning@0.0.0 start: `ng serve`
2019-07-01T23:55:03.747071+00:00 app[web.1]: npm ERR! Exit status 1
2019-07-01T23:55:03.747285+00:00 app[web.1]: npm ERR! Failed at the Planning@0.0.0 start script.
2019-07-01T23:55:03.747374+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-07-02T02:27:27.374798+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=planninghospt.herokuapp.com request_id=5f7477d4-90f7-4bc8-bc00-aa0e3c2da345 fwd="81.241.123.108" dyno= connect= service= status=503 bytes= protocol=https
2019-07-02T02:27:27.952755+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=planninghospt.herokuapp.com request_id=97c521cd-c750-4216-ade8-8ee05e2bfeb9 fwd="81.241.123.108" dyno= connect= service= status=503 bytes= protocol=https
> I see a code H10 : app crashed method GET, i must look for
> /favicon.ico maybe
[Heroku logs 1][1]
[Heroku logs 2][2]
[Heroku logs 3][3]
[Heroku logs 4][4]
[1]: https://i.stack.imgur.com/58FIF.png
[2]: https://i.stack.imgur.com/bfrxq.png
[3]: https://i.stack.imgur.com/e6osB.png
[4]: https://i.stack.imgur.com/4s8Y5.png
..........
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/dist/Planning'));
app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+'/dist/Planning/index.html'));
});
// Start the app by listening on the default Heroku port
app.listen(process.env.PORT || 8080);
......
//Install express server
const express = require('express');
const path = require('path');
const app = express();
// Serve only the static files form the dist directory
app.use(express.static(__dirname + '/dist/Planning'));
app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+'/dist/Planning/index.html'));
});
// Start the app by listening on the default Heroku port
app.listen(process.env.PORT || 8080);
..................................
我认为端口8080不好 否则方法获取不是很好的路径注入 ............................... î______以前是server.js
server.js与连接,但我认为问题出在dist / index.html
î___以前是package.json
I dont know if they are a dependency, script or devDep fail's.
我已经成功启动了这些package.json的“ npm install”
我应该部署AngularApp并对其进行访问,并通过heroku部署到git
我认为端口有问题,如何进行测试?