Please help!! Uncaught (in promise) ReferenceError: module is not defined #1578
Unanswered
martinshaw
asked this question in
Help (React)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have recently attempted to upgrade to v1 of Inertia in my Laravel/Inertia/React app.
Please, please, please can someone with more experience and knowledge of the various versions of Inertia and/or of webpack / tsconfig, let me know what I am missing here. My job is on the line.
I have upgraded 'inertiajs/inertia-laravel' using composer.
I have upgraded my node packages using Yarn.
Followed all of the steps in the Inertia upgrade guide.
Done tonnes of refactoring to use those renamed/moved types and components.
It seems to be able to load createInertiaApp and all other types / objects from
@inertiajs/react
and@inertiajs/core
from within theresources/js/app.js
, but not from within the 'Inertia page components' written in TypeScript.Whatever I try, I cannot get rid of this error when loading any page in my app:
Files below (before/after):
composer.json (before):
composer.json (after):
package.json (before):
package.json (after):
tsconfig.json (before):
tsconfig.json (after):
Beta Was this translation helpful? Give feedback.
All reactions