发布到 Azure 后的 ENOENT
ENOENT after publishing to Azure
我真的希望有人能阐明这里发生的事情。
我正在向 Azure 发布一个 Angular 7 / .Net Core 2 应用程序。我在 Visual Studio.
中使用提供的 Azure 发布配置文件
当我在本地 运行 该应用程序运行良好。部署后,我看到一串错误消息,大部分来自 npm 关于 package.json 文件。
An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (One or more errors
occurred. (The NPM script 'start' exited without indicating that the
Angular CLI was listening for requests. The error output was: npm ERR!
Error: ENOENT, open
'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open
'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json']
npm ERR! errno: 34,
npm ERR! code: 'ENOENT',
npm ERR! path:
'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'
}
npm ERR! You may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR!
您必须通过Kudu 控制台或FTP 将dist/my-app 目录下的所有文件复制到Azure WebApp 的目录wwwroot 中。更好的方法是使用持续部署。
我能够通过将 Azure 显然使用的旧版本更新到他们支持的最新版本的节点来解决这个问题。
这是他们默认使用的古老版本:
我真的希望有人能阐明这里发生的事情。
我正在向 Azure 发布一个 Angular 7 / .Net Core 2 应用程序。我在 Visual Studio.
中使用提供的 Azure 发布配置文件当我在本地 运行 该应用程序运行良好。部署后,我看到一串错误消息,大部分来自 npm 关于 package.json 文件。
An unhandled exception occurred while processing the request. AggregateException: One or more errors occurred. (One or more errors occurred. (The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: npm ERR! Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json'
npm ERR! { [Error: ENOENT, open 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json']
npm ERR! errno: 34,
npm ERR! code: 'ENOENT',
npm ERR! path: 'D:\home\site\wwwroot\ClientApp\node_modules\start\package.json' }
npm ERR! You may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR!
您必须通过Kudu 控制台或FTP 将dist/my-app 目录下的所有文件复制到Azure WebApp 的目录wwwroot 中。更好的方法是使用持续部署。
我能够通过将 Azure 显然使用的旧版本更新到他们支持的最新版本的节点来解决这个问题。
这是他们默认使用的古老版本: