Skip to content

next/dynamic import error only when going to build #40871

Answered by icyJoseph
rimzzlabs asked this question in Help
Discussion options

You must be logged in to vote

Hi,

AFAIK, the problem is that the development mode, doesn't crash on TypeScript errors. It is the build step that really wants you to fix them in order to complete. So there's nothing weird going on here, other than that there's an actual TypeScript error in your application at all times.

You can see that my editor does tell me about the error as I am coding. If your editor is not telling you, perhaps read up on how to tell your editor to use TypeScript from your node_modules, and not its built in TypeScript.

Solution

Now onto the TypeScript error. I've seen this in dynamic imports that do not use the default export. It might have to do with actual React Types and the dynamic type fun…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rimzzlabs
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants