Uncaught SyntaxError: The requested module
See original GitHub issueIssue Description
Versions:
@inertiajs/inertia
version: 0.11.0@inertiajs/inertia-svelte
version: 0.8.0
Describe the problem:
when i using with laravel-vite , getting below error.
Uncaught SyntaxError: The requested module '/node_modules/@inertiajs/inertia/dist/index.js?v=8fdd45f8' does not provide an export named 'Inertia'
Steps to reproduce:
import { createInertiaApp } from '@inertiajs/inertia-svelte';
createInertiaApp({
resolve: name => require(`./Pages/${name}.svelte`),
setup({ el, App, props }) {
new App({ target: el, props })
}
});
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
42 - Stack Overflow
Uncaught SyntaxError: The requested module './add.js' does not provide an export named 'add' ; See the export default ? So it's a default...
Read more >Requested module does not provide export named 'default'
The error "The requested module does not provide an export named 'default'" occurs when we try to import a value or a function...
Read more >The requested module does not provide an export named
I have to fix this problem. Component.tsx:31 Uncaught SyntaxError: The requested module '/@fs/Users/user/Programming/react_project/node_modules/ ...
Read more >the requested module 'fs' does not provide an export named 'fs ...
I'm getting an error stating my drawLine module isn't exporting something called default -why? The error it throws is: Uncaught SyntaxError: The requested...
Read more >How to Solve does not provide an export named 'default'
For example, the SyntaxError occurs when we try to import a function or value from the file using ... SyntaxError: The requested module...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kvraamkey I ran into this same error when using vite-ruby with
@inertiajs/inertia-svelte
. I resolved things by importingInertia
in the main js entrypoint.use
optimizeDeps.include
to force@inertiajs/inertia
&@inertiajs/inertia-svelte
to be pre-bundled in vite