Hi,
Site: lg-costco.netlify.app
My site was building fine. I made a commit that DID NOT change package.json or do anything particularly interesting, and it suddenly stopped working. I made a branch off of the revision associated with the last successful build, and that branch fails with the same error. Here is the “Building” section of the deploy log with the error (Netlify pasted below):
12:16:50 PM: Netlify Build
12:16:50 PM: ────────────────────────────────────────────────────────────────
12:16:50 PM:
12:16:50 PM: ❯ Version
12:16:50 PM: @netlify/build 29.56.1
12:16:50 PM:
12:16:50 PM: ❯ Flags
12:16:50 PM: accountId: 5991d268cf321c127a109f4e
12:16:50 PM: baseRelDir: true
12:16:50 PM: buildId: 675c960694a34f9597f4ea7f
12:16:50 PM: deployId: 675c960694a34f9597f4ea81
12:16:51 PM:
12:16:51 PM: ❯ Current directory
12:16:51 PM: /opt/build/repo
12:16:51 PM:
12:16:51 PM: ❯ Config file
12:16:51 PM: /opt/build/repo/netlify.toml
12:16:51 PM:
12:16:51 PM: ❯ Context
12:16:51 PM: production
12:16:51 PM:
12:16:51 PM: Build command from Netlify app
12:16:51 PM: ────────────────────────────────────────────────────────────────
12:16:51 PM:
12:16:51 PM: $ npm run build
12:16:51 PM: > lg-landing@1.0.1 build
12:16:51 PM: > gatsby build
12:16:53 PM: success compile gatsby files - 1.360s
12:16:53 PM: success load gatsby config - 0.020s
12:16:58 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:16:58 PM: npm error code E404
12:16:58 PM: npm error 404 Not Found - GET https://registry.npmjs.org/@netlify%2fheaders-parser - Not found
12:16:58 PM: npm error 404
12:16:58 PM: npm error 404 '@netlify/headers-parser@^7.2.0' is not in this registry.
12:16:58 PM: npm error 404
12:16:58 PM: npm error 404 Note that you can also install from a
12:16:58 PM: npm error 404 tarball, folder, http url, or git url.
12:16:58 PM: npm error A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-12-13T20_16_54_020Z-debug-0.log
12:16:58 PM: failed Installing Netlify adapter (gatsby-adapter-netlify@^1.0.4) - 4.169s
12:16:58 PM: error Could not install adapter "gatsby-adapter-netlify@^1.0.4". Please install it yourself by adding it to your package.json's dependencies and try building your project again.
12:16:58 PM: Zero-configuration deployment failed to avoid potentially broken deployment.
12:16:58 PM: If you want build to continue despite above problems:
12:16:58 PM: - configure adapter manually in gatsby-config which will skip zero-configuration deployment attempt
12:16:58 PM: - or set GATSBY_CONTINUE_BUILD_ON_MISSING_ADAPTER=true environment variable to continue build without an adapter.
12:16:58 PM:
12:16:58 PM: "build.command" failed
12:16:58 PM: ────────────────────────────────────────────────────────────────
12:16:58 PM:
12:16:58 PM: Error message
12:16:58 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
12:16:58 PM:
12:16:58 PM: Error location
12:16:58 PM: In Build command from Netlify app:
12:16:58 PM: npm run build
12:16:58 PM:
12:16:58 PM: Resolved config
12:16:58 PM: build:
12:16:58 PM: base: /opt/build/repo
12:16:58 PM: command: npm run build
12:16:58 PM: commandOrigin: ui
12:16:58 PM: publish: /opt/build/repo/public
12:16:58 PM: publishOrigin: ui
12:16:58 PM: headers:
12:16:58 PM: - for: /*
values:
Access-Control-Allow-Origin: '*'
Content-Security-Policy: frame-ancestors 'self' http://localhost:3000 http://127.0.0.1:3000 https://*.lettucegrow.com;
X-Frame-Options: ALLOW-FROM *
headersOrigin: config
12:16:58 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:16:58 PM: Failing build: Failed to build site
12:16:58 PM: Finished processing build request in 37.409s
Thanks,
Greg