Closed adriandelgado closed 3 years ago
Please provide a full reproduction as this can't be investigated with just a package.json and some configuration.
Sure! Here is the public repository, the last two commits were attempts to make it work. Vercel-support forked the repository just two hours ago.
We have similar but different error on deployment too. It was working fine on Next 9.5.5 and when we upgraded to 11, got the following error and deployment hangs.
Any quick tips?
The current workaround is to use
next build --no-lint
for now and try redeploying
This works for now. @Aung-Myint-Thein let me know if you find the root cause.
--no-lint
is working but now it failed in a different place.. It said
Failed to compile.
./public/images/png/icon_apply_tutor.png
CompileError: AsyncCompile: Wasm decoding failed: mutable globals cannot be exported @+482
> Build error occurred
Error: > Build failed because of webpack errors
at nextBuildSpan.traceAsyncFn (/root/projects/next_website/node_modules/next/dist/build/index.js:15:924)
The file is there and working in development. :D any tips..? I am using Next/Image
@adriandelgado The error happens because you miss some dependencies (in this case prettier).
The error message should be improved because it is not clear, I have been looking for a solution but i can't figure out why eslint recieves the right message and the NexJS execution doesn't.
The EsLint CLI runs this function:
https://github.com/eslint/eslint/blob/fa1c07c0d65ce21a30f5bb4a9f2ac511f8df6446/lib/cli.js#L301
This is the same as executed in NextJS:
The only difference i see is how eslint catch the errors: https://github.com/eslint/eslint/blob/fa1c07c0d65ce21a30f5bb4a9f2ac511f8df6446/bin/eslint.js#L122-L123 https://github.com/eslint/eslint/blob/fa1c07c0d65ce21a30f5bb4a9f2ac511f8df6446/bin/eslint.js#L67-L115
Capturing exceptions in NextJS in the same way results in inaccurate error too so i don't know why they have diferent behaviour. I'll continue researching and i'll open a PR if i find why it happens.
@IvanRodriCalleja You are right, the error message is very cryptic and doesn't help very much. Installing prettier
fixes everything. I realized that while working on another project but forgot to update this issue.
This is also happening to me with PNG's. Are they supported in nextjs?
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What version of Next.js are you using?
11.0.0
What version of Node.js are you using?
14.17.1
What browser are you using?
Brave
What operating system are you using?
archlinux
How are you deploying your application?
Vercel
Describe the Bug
Trying to deploy a new Next.js project to Vercel causes
UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
The build process doesn't stop. I had to manually cancel it.
This doesn't happen on my machine. Everything compiles just fine.
Expected Behavior
I expect the build to succeed without errors.
To Reproduce
This is a brand new project. .eslintrc:
package.json