Hey all,
I’m working my way through the Pages track, but I’m having some trouble with getting everything running.
I’ve cloned the Locations Starter (Basic) repository and followed all the instructions, but even after npm install
, I get this error on my console: Uncaught ReferenceError: module is not defined at index.js?v=39dd0d3b:5:3
. This error leads me to the React index.js
file within node_modules
, failing on module.exports = require("./cjs/react.development.js");
. This is breaking JS so I can’t get the map to load and continue through the units.
I’m currently using node v18.20.2. I’ve tried upgrading to 20, and reinstalling everything from scratch, but it’s still no use. There’s also a Failed to resolve dependency: react-dom/client, present in 'optimizeDeps.include'
error message when I run npm run dev
.
I’m guessing it might be related, but afaik I’d need to upgrade React to version 18 in order to use react-dom/client. Since the documentation doesn’t match the existing code from the starter repository (docs from Pages track use .cjs
files, actual repository uses .ts
and .js
), is it possible there’s a step missing somewhere?