Error while deploying Gatsby Website to Amplify - could not resolve module "@parcel/namer-default"

Viewed 238

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 Answers
Related