Next.js errors in Glitch

It’s a bit of a mystery. A real pain.

I tried remixing your project and throwing a few things at it…

  1. Running next instead of node server.js… same error
  2. Running enable-npm to force npm instead of pnpm… same error
  3. Removing and reinstalling node-modules… same
  4. Upgrading all versions of react, react-dom, and next to latest… same
  5. Running enable-pnpm in case it cleaned up some erroneous packages as in this case… same error.

The only thing I think is suspicious is that Glitch node packages are at e.g.

And two of the commenters on the GH issue said “I had a node_modules folder in a parent directory up the tree that was causing issues. I deleted that and it started working as expected,”

…which was why I tried disabling pnpm. But it still seems to keep the modules in that dir.

Wish I could help more…

1 Like