- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我试图将一个简单的 react 应用程序部署到Azure,我最初是从我试图部署的一些复杂的东西开始的。我收到了很多没有意义的错误代码,这是我第一次尝试在 azure 上获取类似的内容。所以我决定回到基础知识并尝试获得一个最简单形式的在应用程序服务上工作的 react 应用程序。所以我从 npx create-react-app myapp 创建了一个新的 React 应用程序,我创建了一个新的存储库并将该代码上传到我的 github,转到 azure,创建了一个新的应用程序服务,具有尽可能低的分层定价,并将我的 github 连接到该应用程序服务以进行部署。但在部署过程中,我收到此错误堆栈
Run npm install
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b0d3dfc2d59ddac3f0829e869e8181" rel="noreferrer noopener nofollow">[email protected]</a> postinstall /home/runner/work/react-basic/react-basic/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="24474b5641094e5764170a120a10" rel="noreferrer noopener nofollow">[email protected]</a> postinstall /home/runner/work/react-basic/react-basic/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5b3834293e763128762b2e293e1b68756d756f" rel="noreferrer noopener nofollow">[email protected]</a> postinstall /home/runner/work/react-basic/react-basic/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d0b6a3b5a6b5bea4a390e1fee2fee1e2" rel="noreferrer noopener nofollow">[email protected]</a> (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="46203523302328323506776874687774" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="761005130013180205364458455844" rel="noreferrer noopener nofollow">[email protected]</a> (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9ef8edfbe8fbf0eaeddeacb0adb0ac" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afc9dccad9cac1dbdcef9e819d819e9c" rel="noreferrer noopener nofollow">[email protected]</a> (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0c6a7f697a6962787f4c3d223e223d3f" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="95f3e6f0e3f0fbe1e6d5a4bba7bba4a7" rel="noreferrer noopener nofollow">[email protected]</a> (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="94f2e7f1e2f1fae0e7d4a5baa6baa5a6" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="98feebfdeefdf6ecebd8aab6a9b6aa" rel="noreferrer noopener nofollow">[email protected]</a> (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7d1b0e180b1813090e3d4f534c534f" rel="noreferrer noopener nofollow">[email protected]</a>: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1646 packages from 787 contributors and audited 1786 packages in 26.789s
65 packages are looking for funding
run `npm fund` for details
found 781 vulnerabilities (100 low, 182 moderate, 499 high)
run `npm audit fix` to fix them, or `npm audit` for details
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5d35383131321d6d736c736d" rel="noreferrer noopener nofollow">[email protected]</a> build /home/runner/work/react-basic/react-basic
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
39.38 KB build/static/js/2.43f2ee7e.chunk.js
770 B build/static/js/runtime-main.d67d11c1.js
284 B build/static/js/main.2c72b389.chunk.js
72 B build/static/css/main.d498bfb3.chunk.css
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
> <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9a1aca5a5a689f9e7f8e7f9" rel="noreferrer noopener nofollow">[email protected]</a> test /home/runner/work/react-basic/react-basic
> react-scripts test
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /home/runner/work/react-basic/react-basic
2 files checked.
testMatch: /home/runner/work/react-basic/react-basic/src/**/__tests__/**/*.{js,jsx,ts,tsx}, /home/runner/work/react-basic/react-basic/src/**/*.{spec,test}.{js,jsx,ts,tsx} - 0 matches
testPathIgnorePatterns: /node_modules/ - 2 matches
testRegex: - 0 matches
Pattern: - 0 matches
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="18707d747477582836293628" rel="noreferrer noopener nofollow">[email protected]</a> test: `react-scripts test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6008050c0c0f20504e514e50" rel="noreferrer noopener nofollow">[email protected]</a> test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-09-10T15_42_53_869Z-debug.log
Error: Process completed with exit code 1.
我已经查看了几篇文档,但我还没有找到任何显示在 azure 上设置 React 应用程序的正确方法的内容,其中一个文档已接近,它让我从应用程序服务下载发布配置文件并将其保存到 github key 中,然后从 github 操作设置工作流程,这个示例让我最接近,因为应用程序将构建和部署,但它不起作用,就像它不会进入构建文件夹并以index.html,以及 kudu 控制台上的 wwwroot。包括构建文件夹在内的所有文件都存在。
此时我只想要最简单的方法将 SPA 部署到 azure 应用程序服务。任何具体的文档将不胜感激!
最佳答案
我已经在我的环境中进行了测试。
您可以使用 VS 代码将 React 应用部署到 Azure 应用服务。
在 VS Code 中打开您的项目。
转到扩展。搜索 Azure 应用服务并单击“安装”。
转到 Azure 应用服务。登录您的 Azure 帐户。
单击“部署到 Web 应用程序”。
选择您的订阅。选择您的应用服务。
现在您应该能够将 React 应用程序部署到 Azure 应用服务
关于node.js - 如何将 React 应用程序部署到 Azure 应用服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69135279/
我们正在创建一个 n 层 Silverlight LOB 应用程序,并且正在考虑使用 .NET RIA 服务。我们不清楚这与我们当前的 WCF 服务 API 的关系在哪里。我们当前的架构是: 银光
上下文:我在celery + rabbitmq堆栈上有一个主工作系统。 系统已docker化(此处未提供worker服务) version: '2' services: rabbit:
我是 Windows Azure 新手,我正在尝试将我的 Web 应用程序部署到 Windows Azure。在我的应用程序中,我使用了一些 Web 服务,现在我想知道如何在 Windows Azur
因此,根据我对服务的了解,自定义对象似乎是写入服务以返回数据的方式。如果我正在编写将用于 1) 填充数据库或 2) 为网站提供信息的服务,是否有返回数据集/数据表而不是包含所有这些的自定义对象列表的用
我在 google 和 stackoverflow 上都找过答案,但似乎找不到。我正在尝试将 azure 实验的输出获取到应用程序。我使用 ibuildapp 和谷歌表单制作了该应用程序。如何使用 g
我不小心删除了 kubernetes svc: service "kubernetes" deleted 使用: kubectl delete svc --all 我该怎么办?我只是想删除服务,以便
我正在努力确定解决网络服务问题的最有效方法。 我的情况:我正在开发一个 Android 应用程序,它通过 Web 服务从 mysql 数据库(在我自己的服务器 PC 上)存储和检索数据。用户按下提交按
我一直在翻阅 Android 文档,我很好奇。什么时候绑定(bind)服务而不是不绑定(bind)服务?它提供了哪些优点/限制? 最佳答案 When would you bind a service
我试图从架构的角度理解 hive,我指的是 Tom White 关于 Hadoop 的书。 我遇到了以下关于配置单元的术语:Hive Services、hiveserver2、metastore 等。
我的问题:安装服务后我无法导航到基地址,因为服务不会继续运行(立即停止)。我需要在服务器或我的机器上做些什么才能使 baseAddress 有效吗? 背景:我正在尝试学习如何使用 Windows 服务
我正在努力就 Web 服务的正确组织做出决定。我应该有多个 ASMX 来代表 Web 服务中的不同功能,还是应该有一个 ASMX? 如果我有多个 ASMX,这不构成多个 Web 服务吗? 如果我只有一
我正在从事一个在 azure 平台上提供休息服务的项目。该服务由 iPhone 客户端使用,这是选择其余方法的重要原因之一。 我们希望通过 AccessControlService(ACS) 并使用
我是 Ionic 新手,正在使用 Ionic 3.9.2 我有几个终端命令来为我的 ionic 应用程序提供服务,但是,我没有发现这两个命令之间有任何区别。 ionic serve 和 ionic s
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
作为项目的一部分,我期待着问这个问题。我过去有开发和使用 Web 服务的经验,并且非常熟悉这些服务。但是,有人告诉我,作为下一个项目的一部分,我将需要使用“安全”的 Web 服务。您能否提供一些见解,
我浏览了很多关于这个问题的信息,但找不到解决方案。这里的问题是,我想使用 Apache Cordova 和 Visual Studio 连接到 wcf。因此,如果有人找到合适的工作解决方案,请发布链接
我在 Windows 服务中托管了一个 WCF(从 MS 网站示例中选取),我可以使用 SOAP UI 访问和调用方法。但是,当我尝试使用 jquery 从 Web 应用程序调用相同的方法时,我不断收
我们构建了一个 Android 应用程序,它从 Android 向我的 PHP 服务器发送 HTTP 请求。作为响应,Web 服务将 JSON 对象发送到 Android 应用程序以显示结果。 就像其
我想在 android 应用程序中调用 soap web 服务,它需要一个枚举值作为参数,它是一个标志枚举。如何从 Android 应用程序将一些值作为标志枚举传递给此 Web 服务方法? 我使用 K
我尝试在模拟器上安装 Google Play。我已按照 Google Dev Site 中的说明进行操作. 使用 ADV 管理器似乎没问题,设备的目标是 Google API 版本 22,但是当我运行
我是一名优秀的程序员,十分优秀!