Error: Cannot find module '../build/output/log' on next start #14897
Replies: 10 comments 17 replies
-
yeah just got into this too |
Beta Was this translation helpful? Give feedback.
-
@archywillhe @AryanJ-NYC You're probably accidentally committing your |
Beta Was this translation helpful? Give feedback.
-
If you are trying to deploy a NextJS production build successfully on an Azure WebApp using Azure DevOps' Pipelines, this is how I got it sorted out: Pipeline
The scripts in my
And my
Extra
|
Beta Was this translation helpful? Give feedback.
-
This error occurs when your nextjs symlinks are missing. Make sure when you compress your files before deployment, you also store symlinks. Here is a zip command that I use: zip -r --symlinks deploy.zip . -x node_modules/\* *.git* |
Beta Was this translation helpful? Give feedback.
-
FWIW I got this error when I copy-pasted a nextjs app folder (including a node_modules folder) to a new location. Fixed with Presumably because the copy-paste broke the nextjs symlinks that Gr8z mentioned above |
Beta Was this translation helpful? Give feedback.
-
For those people finding this issue while deploying to Azure, the symlinks need adding as per @Gr8z solution but you need to keep the node_modules otherwise it won't have the packages after deployment. From my Azure pipeline:
|
Beta Was this translation helpful? Give feedback.
-
Combination that worked for me: Devops Build Pipeline:
packages.json
|
Beta Was this translation helpful? Give feedback.
-
Just had this issue randomly appear and adding |
Beta Was this translation helpful? Give feedback.
-
Just delete the node_modules and run npm install. |
Beta Was this translation helpful? Give feedback.
-
I recently got this error while building nextjs in AWS Codepipeline. Running CauseAs suggested by this thread the problem is with the symbolic links of npm SolutionThe solution for AWS Pipeline.
cd /home/user/yourproject
sudo /usr/bin/npm rebuild Pros:
Cons
|
Beta Was this translation helpful? Give feedback.
-
Has anyone run into the following error?
I'm trying to deploy my NextJS application to Microsoft Azure (using app Services) but am running into this odd roadblock. A quick Google search shows an extremely similar, mysterious bug: https://stackoverflow.com/questions/62378045/how-to-fix-next-js-vercel-deployment-module-not-found-error
Has anyone encountered this before?
Beta Was this translation helpful? Give feedback.
All reactions