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

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

Andrew Knott February 2, 2022

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
AUG Leaders

Atlassian Community Events