【发布时间】:2019-10-28 11:11:16
【问题描述】:
我在本地机器上开发了一个 Angular 应用程序。我正在尝试将我的 Angular 应用程序部署在 vm 中。我在服务器中安装了 node 和 npm。我遵循了一个教程 - https://coursetro.com/posts/code/112/Angular-5-Deployment---Deploy-your-Angular-App
我已经使用
创建了 dist 文件夹ng build --prod
然后将dist中产生的文件夹转移到服务器下一个文件夹test下。
我运行了命令
ng build --prod --base-href "/test/".
但这会报错
The build command requires to be run in an Angular project, but a project definition could not be found.
我哪里错了?我尝试构建的位置是否正确?
【问题讨论】:
标签: angular deployment server production-environment