Segmentation fault when trying to run SvelteKit dev with 0.16.0-beta since 0.16.0-beta.9
See original GitHub issueDescribe the bug
When i try to run npm run dev in latest SvelteKit, i get an error [1] 2604 segmentation fault npm run dev.
Tried to revert version on vite-plugin-windicss step by step and found that 0.16.0-beta.9 and earlier versions are working normally.
Minimal Reproductions
- Set up latest SvelteKit skeleton project with enabled typescript, eslint and prettier with
npm init svelte@nextcommand - Install
vite-plugin-windicsswithnpm i -D vite-plugin-windicss - Add it to svelte.config.js like this
import preprocess from 'svelte-preprocess';
import windicss from 'vite-plugin-windicss';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',
vite: {
plugins: [
windicss.default()
]
}
}
};
export default config;
- Running
npm run devcausessegmentation faulterror - Running
npm run buildcauses
[vite-plugin-svelte] failed to require config /Users/dioxine/svelte-test/svelte.config.js
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/dioxine/svelte-test/svelte.config.js
require() of ES modules is not supported.
...
Versions
- vite-plugin-windicss: v0.16.0-beta.14
- vite: v2.3.0
- framework(vue/react/svelte/etc): SvelteKit v1.0.0-next.105
- node: v14.15.4
Additonal Context
After some investigation, i found that it have started after devs of SvelteKit switched to ESM format of svelte.config.js
in 1.0.0-next.97 version. With CommonJS version of svelte.config.cjs vite-plugin-windicss works normally but seems that they will remove ability to use CJS version of config soon.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
npm run Segmentation fault: 11 - node.js - Stack Overflow
For me it was due to node version mismatch. I tried running node v8 compatible package, but my node version was set to...
Read more >sentry Changelog - PyUp.io
**Breaking Change**: This version introduces a change to the grouping of issues. The SDK now sets the `inApp` flag for frames originating from...
Read more >🍃 Windi CSS for Vite ⚡️ - BestofVue
Segmentation fault when trying to run SvelteKit dev with 0.16.0-beta since 0.16.0-beta.9. Describe the bug When i try to run npm run dev...
Read more >Hajimari is a beautiful & customizable browser startpage ...
You might want to run this behind ingress with access restrictions. ... Describe the bug After upgrading k3s to 1.22.2 i got the...
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

any solution to the problem?
@TheComputerM downgrade to 0.15.10 for now. there is a pr open to fix this, once it is merged it should work. see https://github.com/sveltejs/vite-plugin-svelte/pull/54