Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,469
Community Members
 
Community Events
176
Community Groups

Sudden new issue. Node / Gatsby Build not able to find path. Pipeline suddenly stopped working

We have a pipeline that runs in production when some content changes in a Sanity CMS. A Gatsby site is built and deployed.

This morning the pipeline failed and has repeatedly failed when it's been triggered automatically and manually.

The build process and step run perfectly fine when running locally with the same environment variables. 

This issue is particular to the run on Bitbucket Pipelines.

What has changed on BitBucket's side to make this happen? We have made no code level changes and the build works locally.

 

Partial Log Output (highlighted issue) 

 

info [sanity] Fetching export stream for dataset
info [sanity] Done! Exported 1305 documents.
success Checking for changed pages - 0.001s
success source and transform nodes - 1.543s
success building schema - 0.658s
...
info Creating Event page: ..
...
success createPages - 0.278s
success createPagesStatefully - 0.069s
success Checking for changed pages - 0.005s
success update schema - 0.129s
success onPreExtractQueries - 0.003s
...
success write out requires - 0.004s
success Building production JavaScript and CSS bundles - 24.688s
success Rewriting compilation hashes - 0.001s
success Building HTML renderer - 6.792s
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

[Error: ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/web/public/page-data/sq/d/1961432413.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/opt/atlassian/pipelines/agent/build/web/public/page-data/sq/d/1961432413.json'
}
failed Building static HTML for pages - 0.587s
error Building static HTML failed for path "/membership/become-a-member"

 ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent

Partial bitbucket-pipelines.yml

 

master:

- step:

name: Build and deploy production site

deployment: production

size: 2x

caches:

- pip

- gatsby-cache

- gatsby-build

- gatsby-node

script:

- cd web/

- pip install --upgrade awscli

- npm install

- npm run build:production

- npm run replace:domain

- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY npm run deploy -- -y

- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_S3_BUCKET=$AWS_S3_BUCKET npm run deploy:redirects

- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY AWS_S3_BUCKET=$AWS_S3_BUCKET aws cloudfront create-invalidation --distribution-id $PRODUCTION_DISTRIBUTION_ID --paths "/*"


0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events