You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After setting up a brand new open-wc web component project with demoing enabled, I am unable to get yarn run storybook to work (but only on Windows). I get the following error:
SB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @web\storybook-framework-web-components\preset.
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.
.\node_modules\@web\storybook-framework-web-components\preset.mjs:2
import cjsEntrypoint from './dist/preset.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:76:18)
at wrapSafe (node:internal/modules/cjs/loader:1283:20)
at Module._compile (node:internal/modules/cjs/loader:1328:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.newLoader [as .mjs] (.\node_modules\esbuild-register\dist\node.js:2262:9)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at interopRequireDefault (.\node_modules\@storybook\core-common\dist\index.js:6:21)
at loadPreset (.\node_modules\@storybook\core-common\dist\index.js:15:82)
Wondering if this was a Windows issue, I made a nushell script to reproduce the project setup and a Nix flake to ensure a reproducible environment. Running that flake with nix develop sets up the environment and runs the setup script. This all works just fine for running the storybook command on Linux (NixOS-WSL), but running the same setup script on Windows and then running the storybook command produces the aforementioned error.
For now I'm likely going to continue working on my project on NixOS since the storybook command works there, but any help figuring out what's causing the above error and how we can fix it would be appreciated.
The text was updated successfully, but these errors were encountered:
After setting up a brand new open-wc web component project with demoing enabled, I am unable to get
yarn run storybook
to work (but only on Windows). I get the following error:Wondering if this was a Windows issue, I made a nushell script to reproduce the project setup and a Nix flake to ensure a reproducible environment. Running that flake with
nix develop
sets up the environment and runs the setup script. This all works just fine for running the storybook command on Linux (NixOS-WSL), but running the same setup script on Windows and then running the storybook command produces the aforementioned error.For now I'm likely going to continue working on my project on NixOS since the storybook command works there, but any help figuring out what's causing the above error and how we can fix it would be appreciated.
The text was updated successfully, but these errors were encountered: