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
asked 4 months ago90 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions