angular - Heroku构建无法在`.angular-cli.json`中找到任何应用程序
问题描述
在 heroku 平台上部署我的 Angular 应用程序时,我收到此错误日志。
我一直在关注这个链接来配置 angular-cli.json 和其他一些东西。
https://itnext.io/how-to-deploy-angular-application-to-heroku-1d56e09c5147
-----> 构建 运行 heroku-postbuild > angular-5-formularis@1.0.0 heroku-postbuild /tmp/build_254071f3c66ba5811ab2e3b07c9696c2 > ng 构建 --prod 在 .angular-cli.json 中找不到任何应用程序。 npm 错误!代码生命周期 npm 错误!错误号 1 npm 错误!angular-5-formularis@1.`0.0 heroku-postbuild: `ng build --prod` npm 错误!退出状态 1 npm 错误! npm 错误!在 angular-5-formularis@1.0.0 heroku-postbuild 脚本中失败。 npm 错误!这可能不是 npm 的问题。上面可能有额外的日志输出。 npm 错误!可以在以下位置找到此运行的完整日志: npm 错误!/tmp/npmcache.ekujC/_logs/2019-10-18T18_19_38_109Z-debug.log -----> 构建失败
解决方案
我已经解决了这个问题,只需将 angular-cli.json 移动到项目的根目录。
推荐阅读
- c# - 在 Identity Server 4 中,如何添加实际用户,而不是测试用户
- javascript - 如何解决 Uncaught TypeError: Cannot convert null or undefined to object?
- cypress - cy.window 的后续命令未运行/工作
- django - 为具有多对多字段的现有对象批量添加对象
- python - python:将结构化但分散的数据转换为网格数据而不进行插值 - 快速
- javascript - ASP.NET Core Razor 无法从 javascript ajax 调用访问控制器
- ajax - 使用 ajax 的实时聊天弹出通知
- asp.net-core - 如何在 .NET Core Web API 中实现 ReadOnly Swagger 属性?
- java - 类不是抽象的,不会覆盖抽象方法简单代码
- reactjs - react + socket.io socket.on 事件未正确更新状态