Concurrently JS application pipeline install and build hangs (Express js for server, Create-React-App for Client)

柔情痞子 提交于 2021-02-02 09:46:47

问题


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!


回答1:


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.


来源:https://stackoverflow.com/questions/62889091/concurrently-js-application-pipeline-install-and-build-hangs-express-js-for-ser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!