尝试在 Azure 虚拟机中部署 angular 应用程序时出错:
Error while trying to deploy the angular app in a azure vm:
我在我的本地机器上开发了一个 angular 应用程序。我正在尝试在虚拟机中部署我的 angular 应用程序。我在服务器上安装了 node 和 npm。我遵循了教程 - https://coursetro.com/posts/code/112/Angular-5-Deployment---Deploy-your-Angular-App
我使用
创建了 dist 文件夹
ng build --prod
然后t运行将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.
我哪里错了?我尝试构建的位置是否正确?
运行ning ng build 两次是错误的。 运行 一次,获取 dist 输出并将其部署到像 nginx 这样的 Web 服务器。也不需要在服务器上安装 npm 和节点,除非你有节点后端。
我在我的本地机器上开发了一个 angular 应用程序。我正在尝试在虚拟机中部署我的 angular 应用程序。我在服务器上安装了 node 和 npm。我遵循了教程 - https://coursetro.com/posts/code/112/Angular-5-Deployment---Deploy-your-Angular-App
我使用
创建了 dist 文件夹ng build --prod
然后t运行将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.
我哪里错了?我尝试构建的位置是否正确?
运行ning ng build 两次是错误的。 运行 一次,获取 dist 输出并将其部署到像 nginx 这样的 Web 服务器。也不需要在服务器上安装 npm 和节点,除非你有节点后端。