Node.js 在amplify上部署NodeJS Express
我正在尝试在AWS Amplify上部署一个应用程序。 该应用程序是React前端和NodeJS Express后端。 前端工作正常,但后端只是在没有任何合理解释的情况下卡住了 我的YML文件是Node.js 在amplify上部署NodeJS Express,node.js,amazon-web-services,express,aws-amplify,Node.js,Amazon Web Services,Express,Aws Amplify,我正在尝试在AWS Amplify上部署一个应用程序。 该应用程序是React前端和NodeJS Express后端。 前端工作正常,但后端只是在没有任何合理解释的情况下卡住了 我的YML文件是 version: 1 backend: phases: build: commands: - npm run build-backend postBuild: commands: - cd .. frontend: ph
version: 1
backend:
phases:
build:
commands:
- npm run build-backend
postBuild:
commands:
- cd ..
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build-frontend
artifacts:
baseDirectory: ./client/build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
生成后端脚本:
"build-backend": "cd server && npm run start",
npm运行启动脚本:
"start": "npm install && node index.js"
该构建在npm安装中被卡住,10-20分钟后,在没有以下日志的情况下“放弃”
2021-04-22T11:49:20.693Z [INFO]: > server@1.0.0 start /codebuild/output/src650104622/src/myBlog/server
> npm install && node index.js
2021-04-22T11:49:26.976Z [INFO]: > bcrypt@5.0.0 install /codebuild/output/src650104622/src/myBlog/server/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
谢谢