-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] Fails to load in Node 23 with SB_CORE-SERVER_0002 (CriticalPresetLoadError)
#229
Comments
Hm, so from the initial investigation. I've been manually fixing the Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]_@[email protected][email protected]_prettier@3._uocwypg2nwmmz5omf6wak5chkq/node_modules/@storybook/node-logger/package.json imported from /Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]_@[email protected][email protected]_prettier@3._uocwypg2nwmmz5omf6wak5chkq/node_modules/@storybook/addon-svelte-csf/dist/compiler/post-transform/story/insert-description.js While everything seems to be OK inside the EDIT. I was able to continue the "exports": {
".": {
"types": "./shim.d.ts",
- "import": "./shim.mjs",
+ "default": "./shim.mjs",
"require": "./shim.js"
},
"./package.json": "./package.json"
}, There either has been some breaking change in Node.js that I am not aware of, or something else is causing all those different errors. EDIT. I got it working for Node.js EDIT. The above solution breaks in Node.js SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: ./.storybook/main.ts.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: /Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]._mlbgkp7jlugd2nf3l45vsunbbu/node_modules/@storybook/addon-svelte-csf/dist/preset.js.
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
If you believe this is a bug, please open an issue on Github.
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at assert (node:internal/assert:14:11)
at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:329:5)
at new ModuleJobSync (node:internal/modules/esm/module_job:313:34)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:314:11)
at loadESMFromCJS (node:internal/modules/cjs/loader:1381:24)
at Module._compile (node:internal/modules/cjs/loader:1503:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Object.newLoader [as .mjs] (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:2262:9)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
More info:
at loadPreset (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/common/index.cjs:139445:13)
More info:
at loadPreset (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/common/index.cjs:139445:13)
at async Promise.all (index 1)
at async loadPresets (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/common/index.cjs:139455:55)
at async getPresets (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/common/index.cjs:139488:11)
at async buildDevStandalone (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/core-server/index.cjs:48473:11)
at async withTelemetry (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/core-server/index.cjs:47080:12)
at async dev (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/cli/bin/index.cjs:2877:3)
at async r.<anonymous> (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]/node_modules/@storybook/core/dist/cli/bin/index.cjs:2929:74)
WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
WARN Failed to load preset: {"type":"presets","name":"/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]._mlbgkp7jlugd2nf3l45vsunbbu/node_modules/@storybook/addon-svelte-csf/dist/preset.js"} on level 1
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at assert (node:internal/assert:14:11)
at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:329:5)
at new ModuleJobSync (node:internal/modules/esm/module_job:313:34)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:314:11)
at loadESMFromCJS (node:internal/modules/cjs/loader:1381:24)
at Module._compile (node:internal/modules/cjs/loader:1503:5)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Object.newLoader [as .mjs] (/Users/xeho91/Nextcloud/Projects/xeho91/xeho91/node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:2262:9)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
(node:89773) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
ELIFECYCLE Command failed with exit code 1. And to fix this one, I had to revert the change in |
Describe the bug
When starting up a fresh Storybook project (both 8.3 and 8.4) with Svelte 5 and v5 of this addon, it fails to start with the error pasted below.
Downgrading Node to v22 fixes it. So does removing the addon and removing
.svelte
from thestories
glob, which is why I've narrowed it down to this.Steps to reproduce the behavior
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots and/or logs
Environment
Additional Context
Originally reported in sveltejs/cli#296 (comment) and sveltejs/cli#295
The text was updated successfully, but these errors were encountered: