Search code examples
node.jsreactjsnetlifyremix.run

Starting Remix project with netlify but got this error : Unexpected Server Error


I just started a new project with remix and netlify, it works in production but when I use npm run dev and go to localhost:3000 I get this :

Unexpected Server Error

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

which is weird cause it works in production and all I have done for now is following the README file


Solution

  • I just forgot to run the posinstall script, it was not in the readme but in the documentation

    npm run postinstall