gpt4 book ai didi

asp.net - ASP.NET Core React 应用程序的自动部署失败,错误代码为 : Unsupported platform for fsevents@1. 1.3

转载 作者:行者123 更新时间:2023-12-03 04:20:44 24 4
gpt4 key购买 nike

我有一个非常标准的 ASP.NET Core 应用程序。这是一个 React 应用程序。

我通过 Deployment options 部署应用程序在 Azure 中,每当我推送到 Github 时。

然而,就在最近,我开始收到错误:Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d4b5e485b4843595e6d1c031c031e" rel="noreferrer noopener nofollow">[email protected]</a>

在我进行以下提交后,这种情况开始发生:

enter image description here

或者我更新的package.json文件:

{
"name": "Likvido.CreditRisk",
"private": true,
"version": "0.0.1",
"devDependencies": {
"@types/history": "4.6.0",
"@types/react": "15.0.35",
"@types/react-bootstrap-typeahead": "^2.3.0",
"@types/react-dom": "15.5.1",
"@types/react-hot-loader": "3.0.3",
"@types/react-router": "4.0.12",
"@types/react-router-dom": "4.0.5",
"@types/webpack-env": "1.13.0",
"aspnet-webpack": "^2.0.1",
"aspnet-webpack-react": "^3.0.0",
"awesome-typescript-loader": "3.2.1",
"bootstrap": "3.3.7",
"css-loader": "0.28.4",
"event-source-polyfill": "0.0.9",
"extract-text-webpack-plugin": "2.1.2",
"file-loader": "0.11.2",
"grunt": "1.0.1",
"grunt-contrib-concat": "1.0.1",
"grunt-contrib-cssmin": "2.1.0",
"grunt-contrib-sass": "1.0.0",
"grunt-contrib-uglify": "3.2.1",
"grunt-contrib-watch": "1.0.0",
"isomorphic-fetch": "2.2.1",
"jquery": "3.2.1",
"json-loader": "0.5.4",
"react": "15.6.1",
"react-dom": "15.6.1",
"react-hot-loader": "3.0.0-beta.7",
"react-router-dom": "4.1.1",
"style-loader": "0.18.2",
"typescript": "2.4.1",
"url-loader": "0.5.9",
"webpack": "2.5.1",
"webpack-hot-middleware": "2.18.2"
},
"dependencies": {
"react-bootstrap-typeahead": "^2.5.1"
}
}

我的挑战:如何解决这个问题?

我知道安装react-bootstrap-typeahead后,它可能安装了fsevents包裹。

但是,它在本地运行得很好。当我通过 Visual Studio 内的标准发布进行发布时,它可以工作。

我应该做什么才能让它在 Azure 中的自动部署中正常工作,有什么想法吗?

事件日志中的错误:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj...
Restore completed in 6.61 sec for D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj.
Restore completed in 1.28 min for D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj.
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Restore completed in 381.1 ms for D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj.
Restore completed in 440.47 ms for D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj.
Likvido.CreditRisk -> D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\bin\Release\netcoreapp2.0\Likvido.CreditRisk.dll
<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cc80a5a7baa5a8a3e28fbea9a8a5b89ea5bfa78cfce2fce2fd" rel="noreferrer noopener nofollow">[email protected]</a> D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk
+-- @types/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d5a7b0b4b6a1f8b7babaa1a6a1a7b4a5f8a1aca5b0b4bdb0b4b195e7fbe6fbe5" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c3c8c1c9ce8dc6d5cec3d4c9cfcee0918e908e90" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2f4c434e5c5c414e424a5c6f1d011d011a" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1773787a3a7f727b67726564572439243926" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7c121d123c4e5245524e" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbaba9b4abf6afa2abbea8f6bea3afa9ba9beaf5ebf5ea" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b392e2a283f662924243f383f392a3b663f323b2e2a232e2a2f0b79657e657a" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="96e4f3f7f5e2bbf9f8f5fafff5fdf9e3e2e5fff2f3d6a0b8a1b8a7" rel="noreferrer noopener nofollow">[email protected]</a>
+-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5321363230277e3c2536213f322a2013637d6b7d60" rel="noreferrer noopener nofollow">[email protected]</a>
`-- <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bdcfd8dcdec990c9cfdcd3ced4c9d4d2d390dacfd2c8cdfd8f938f938c" rel="noreferrer noopener nofollow">[email protected]</a>

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\6.9.1\\node.exe" "D:\\Program Files (x86)\\npm\\3.10.8\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ee889d8b988b809a9daedfc0dfc0dd" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: ia32

npm ERR! Please include the following file with any support request:
npm ERR! D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\npm-debug.log
D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj(62,5): error MSB3073: The command "npm install" exited with code 1.
Failed exitCode=1, command=dotnet publish "D:\home\site\repository\Likvido.CreditRisk\Likvido.CreditRisk\Likvido.CreditRisk.csproj" --output "D:\local\Temp\8d58b5d12624ee6" --configuration Release
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\71.10217.3259\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

最佳答案

我遇到了类似的问题,并通过升级节点来修复它,然后将 "optional": true 添加到 fsevents 条目下的 npm-shrinkwrap.json 中。该条目如下所示:

"fsevents": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
"dev": true,
"optional": true,
... More stuff here

关于asp.net - ASP.NET Core React 应用程序的自动部署失败,错误代码为 : Unsupported platform for fsevents@1. 1.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49326374/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com