同时 JS 应用程序管道安装和构建挂起(用于服务器的 Express js,用于客户端的 Create-React-App) [英] Concurrently JS application pipeline install and build hangs (Express js for server, Create-React-App for Client)

查看:11
本文介绍了同时 JS 应用程序管道安装和构建挂起(用于服务器的 Express js,用于客户端的 Create-React-App)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:我有一个带有服务器(处理文件上传和删除的 Express Server)和客户端(前端 Create-React-App)的项目.项目结构如下所示:

  1. 然后在github中查看Action的状态.

Problem: I have a project with a server (Express Server that handles file uploading and deleting) and client (Front End Create-React-App). The project structure looks like follows:

Root Folder With Server

Client Folder

Each folder has it's own package.json. Server Package.json. Client package.json

I'm trying to build and deploy onto azure however the pipeline hangs on "npm install and build".

It seems like the build succeeds but this phase just hangs. Here is my server.js (the routes are not included) file and yaml file just in case.

I'd appreciate any kind of help. Thank you!

解决方案

Troubleshooting suggestions:

  1. In the case of ensuring that the code in github is consistent with the local code, if an exception occurs, it is recommended to replace the linux platform and redeploy.

  2. It is recommended to use my suggestion to recreate the repository, and then check the Action status in github.

Sum up:

In general, it is more appropriate to use Linux in azure than windows. For example, Linux supports npx, and may also support other packages and commands. When the local code can run normally, there is generally no problem when deploying to github, unless there may be modifications, which we have ignored. So make sure the code is consistent.

General correct deployment steps:

  1. First in the portal, make sure to create a web app application (not a static web app), and select the node environment.

  2. Make sure that the sever program can run normally locally. Create a new repository in github.

    ->git init

    ->git add.

    ->git commit -m'init'

    ->git remote add origin https://github.com/{your name}/newAppname.git

    ->git push -u origin master

  3. Connect in the Portal's Deployment center.

  1. Then check the status of Action in github.

这篇关于同时 JS 应用程序管道安装和构建挂起(用于服务器的 Express js,用于客户端的 Create-React-App)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆