-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: lodash-es\lodash.js #1549
Comments
Closing as duplicate of vitejs/vite#2393 |
@benmccann I am facing the same issue, but on a linux box, not really sure that it is a Windows issue.
|
I found a workaround by moving |
|
I can confirm My import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter({
fallback: '200.html'
}),
vite: {
optimizeDeps: {
include: ['broadcast-channel']
},
server: {
proxy: {
'/api': 'http://localhost:3000/',
}
}
},
ssr: false,
appDir: 'custom'
}
};
export default config; |
@frederikhors I've had issues with I've also had issues with |
Wow. All this is scary! For now I'm using |
Describe the bug
I'm trying to use
lodash-es
like this:but I'm getting the below error.
Logs
To Reproduce
Use
lodash-es
in a new svelte-kit skeleton (withinit
).Information about your SvelteKit Installation:
Diagnostics
The output of
npx envinfo --system --npmPackages svelte,@sveltejs/kit,vite --binaries --browsers
:System:
OS: Windows 10 10.0.19042
Binaries:
Node: 14.17.0 - C:\Program Files\nodejs\node.EXE
npm: 7.14.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@sveltejs/kit: 1.0.0-next.109 => 1.0.0-next.109
svelte: 3.38.2 => 3.38.2
vite: 2.3.3 => 2.3.3
Severity
This is really annoying.
The text was updated successfully, but these errors were encountered: