3

I'm trying to deploy my Gatbsy Website to AWS Amplify, but on the build stage I encounter this error:

Could not resolve module "@parcel/namer-default" from "/codebuild/output/src355497797/src/[MY-PACKAGE-NAME]/node_modules/@gatsbyjs/parcel-namer-relative-to-cwd/lib/index.js".

I've already tried to change the node version, both on Amplify and by creating a .nvmrc file in my project, but it didn't work.

Here is the longer error message:

2022-07-04T08:08:54.261Z [WARNING]: error Failed to compile Gatsby files (Error):
                                    Could not resolve module "@parcel/namer-default" from "/codebuild/output/src355497797/src/the-daily-bond/node\_modules/@gatsbyjs/parcel-namer-relative-to-cwd/lib/index.js".
2022-07-04T08:08:54.263Z [INFO]: not finished compile gatsby files - 0.860s
2022-07-04T08:08:55.028Z [ERROR]: !!! Build failed
2022-07-04T08:08:55.134Z [ERROR]: !!! Non-Zero Exit Code detected```
1
  • Update: by updating node to the latest version, this error has now disappeared, but now another one pops up: lmdb-darwin-x64 not accessible from @parcel/cache:lmdb Commented Jul 4, 2022 at 9:04

1 Answer 1

4

Without updating the node I was able to fix the problem by installing:

"@parcel/core": "^2.6.2",
"@parcel/namer-default": "^2.5.0",

https://github.com/gatsbyjs/gatsby/issues/35952

You can try just with @parcel/core

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, this resolved the issue for me. Strangely I only needed /core to get it working locally, but I also needed /namer-default to get it to build on Netlify.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.