我使用 angular cli ng build 命令构建了 angular 2 应用程序,它完全正常,它创建了 dist 文件夹。
为了部署它,我按照本教程将 angular 2 应用程序部署到 heroku
当我按照所有步骤操作时,我输入heroku open但我收到一个应用程序错误
ng: not found
日志
如果你想看,这是我的 package.json 文件
这似乎是 angular-cli 和他的命令 ng 的问题,但在我的 package.json 中我有它
`{
"name": "rusticstock",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "http-server",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor",
"preinstall": "npm install -g http-server",
"postinstall": "ng build && mv dist/* ."
},
"private": true,
"dependencies": {
"angular-cli": "1.0.0-beta.16",
"@angular/common": "2.0.2",
"@angular/compiler": …Run Code Online (Sandbox Code Playgroud)