question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Segmentation fault when trying to run SvelteKit dev with 0.16.0-beta since 0.16.0-beta.9

See original GitHub issue

Describe 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

  1. Set up latest SvelteKit skeleton project with enabled typescript, eslint and prettier with npm init svelte@next command
  2. Install vite-plugin-windicss with npm i -D vite-plugin-windicss
  3. 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;
  1. Running npm run dev causes segmentation fault error
  2. Running npm run build causes
[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:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
gent-911commented, May 29, 2021

any solution to the problem?

1reaction
eikarambacommented, Jun 9, 2021

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found