Unexpected error: Invalid string length

For Workes & Pages, what is the name of the domain?

No domain yet.

What is the error message?

Failed: Error while executing user command. Exited with error code: 1 Failed: build command exited with code: 1 Failed: error occurred while running build command

What is the issue or error you’re encountering

I was building a NextJs project and the build was actually completed. But at last I get this error: Unexpected error: Invalid string length.

What steps have you taken to resolve the issue?

I created an Environment Variable of NODE_VERSION and set it to 18

Screenshot of the error

errorcd.png

Does the build work locally? That log message looks like it is an error from the nextjs process.

Yes, the build works locally.

Unfortunately, I don’t have much experience with nextjs so can’t help debug that.