-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite import error #121
Comments
I can confirm this is an issue with versions of Vite greater than 3.0.0 - If you revert to Vite 3.0.0 it does find the dependency. |
It doesn't work for me on 3.0.0 either |
I'm seeing this issue, too. |
A probably really hacky workaround is to pre-bundle some dependencies ( import { sveltekit } from '@sveltejs/kit/vite';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()],
optimizeDeps: {
include: [
'svelte-jsoneditor',
'immutable-json-patch',
'json-source-map',
'classnames',
'natural-compare-lite',
'ajv-dist'
]
}
};
export default config; Not quite sure what I'm up against here, but it works for now.. |
Thanks for reporting. It's a bit of a whac-a-mole thing with SvelteKit in beta, just switched to Vite@3, ES / CommonJS hybrid cases, and plenty of different build tools. Maybe we're a bit too much on the bleading edge of development 😁. How can I reproduce this issue exactly? I just tried the following:
From your example trace it looks like you're using pnpm, but funny enough both |
You're right, I just followed the same procedure and didn't encounter the error anymore! I checked which version of |
Good to hear, thanks! |
I updated vite and everything worked |
😅👍 |
An error appears when importing the editor (even if using vite-plugin-iso-import):
The requested module '/node_modules/.pnpm/immutable-json-patch@3.0.0/node_modules/immutable-json-patch/lib/umd/immutableJSONPatch.js?v=e94066c2' does not provide an export named 'compileJSONPointer'
The problem is that vite imports immutable-json-patch from umd instead of es (https://github.com/josdejong/immutable-json-patch/blob/main/package.json#L12)
The text was updated successfully, but these errors were encountered: