Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Next.js] build failed when using PnP of Yarn Berry #3439

Open
4 tasks done
steadily-worked opened this issue Apr 24, 2023 · 1 comment
Open
4 tasks done

[Next.js] build failed when using PnP of Yarn Berry #3439

steadily-worked opened this issue Apr 24, 2023 · 1 comment
Labels
compute question Further information is requested

Comments

@steadily-worked
Copy link

Before opening, please confirm:

App Id

d3hnphv5vamg3g

AWS Region

ap-northeast-2

Amplify Hosting feature

Deployments

Question

after i implemented PnP of Yarn Berry in project, local build & CI is fine.
but, During the deployment process through Amplify, i encountered the following error:

"!!! CustomerError: The 'node_modules' folder in the standalone directory (/codebuild/output/src447661411/src/~~~/.next/standalone) is missing the 'next' dependency. This is required at runtime to run your application. If you are using a monorepo framework, you may need to do additional setup to ensure the necessary runtime dependencies are included in the standalone output directory. Read more: https://github.com/aws-amplify/amplify-hosting/blob/main/FAQ.md#using-a-monorepo-framework".text

Since the build and deployment process was successful before introducing PnP, it is suspected that the error occurred due to the introduction of PnP. The disappearance of the node_modules folder after using PnP seems to be the cause of the issue, and i'm not sure how to resolve it.

@steadily-worked steadily-worked added the question Further information is requested label Apr 24, 2023
@steadily-worked
Copy link
Author

steadily-worked commented Apr 24, 2023

Just to clarify, Next.js project that i want to deploy is not a monorepo and i'm not using monorepo framework like Nx.
and, my Next.js version is 13.2.1.

@ghost ghost removed the monorepo label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compute question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant