You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to import @inertiajs/vue, I get error "Uncaught SyntaxError: The requested module '/node_modules/deepmerge/dist/cjs.js?v=51e75926' does not provide an export named 'default'"
#1814
In my main.js page, I have this line:
import { createInertiaApp } from '/node_modules/@inertiajs/vue3'
But when it runs in a browser, the browser says:
Uncaught SyntaxError: The requested module '/node_modules/deepmerge/dist/cjs.js?v=51e75926' does not provide an export named 'default'
Steps to reproduce:
Install Laravel and Vite and Inertia.
In index.blade.php: @Vite('/resources/views/pages/main.js')
In that main.js file:
import { createApp, h } from '/node_modules/vue'
import { createInertiaApp } from '/node_modules/@inertiajs/vue3'
The "vue" file gets imported, but I can't import @inertiajs/vue3, becaues the browser throws that error.
I am not including deepmerge in my package.json, but package-lock.json mentions node_modules/deepmerge version 4.3.1
The text was updated successfully, but these errors were encountered:
Why are you trying to import using the absolute path anyway?
NodeJS automatically resolves imports based on the package name using the best available location. You're probably breaking the logic by trying to force it to use a specific location.
Version:
@inertiajs/vue3
version: 1.0.15Describe the problem:
In my main.js page, I have this line:
import { createInertiaApp } from '/node_modules/@inertiajs/vue3'
But when it runs in a browser, the browser says:
Uncaught SyntaxError: The requested module '/node_modules/deepmerge/dist/cjs.js?v=51e75926' does not provide an export named 'default'
Steps to reproduce:
Install Laravel and Vite and Inertia.
In index.blade.php:
@Vite('/resources/views/pages/main.js')
In that main.js file:
import { createApp, h } from '/node_modules/vue'
import { createInertiaApp } from '/node_modules/@inertiajs/vue3'
The "vue" file gets imported, but I can't import @inertiajs/vue3, becaues the browser throws that error.
I am not including deepmerge in my package.json, but package-lock.json mentions node_modules/deepmerge version 4.3.1
The text was updated successfully, but these errors were encountered: