Code pipeline build stage fail with node.js app

0

I have a node.js/express app I have deployed on elastic beanstalk. I've build and zipped the backend and successfully deployed the app manually. I would like to have Code pipeline get the source code on github, build the app and deploy to the current elastic beanstalk environment. I've written a buildspec.yml file and placed it in the root of my project. The root also contains the /backend and /frontend folders for the app. The build stage fails because it cannot find the .YAML file. When I put the build instructions directly into codebuild, the build starts but fails at npm run build. I've tested the build commands locally and they work. Here is what is currently in my buildspec.yml: version: 0.2 phases: pre_build: commands: - cd frontend - npm install build: commands: - npm run build - mv build ../backend/ - cd ../backend - npm install - npm shrinkwrap post_build: commands: - npm run buildpack

any suggestions?

devsax
已提問 5 個月前檢視次數 105 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南