-
Notifications
You must be signed in to change notification settings - Fork 106
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] Cannot find module 'node:path' #452
Comments
Hi, Vite 3 requires node 16 and above. See vitejs/vite#9113 for more details. |
Oh, and if you're not using vite 3, please pin @storybook/builder-vite to |
Thank you, it was the node version, I was using v14.16.0 (as in the system info). |
You need to add "type": "module" in package.json to fix this in node v14 |
@sourabh129 that shouldn't have anything to do with this error. That has to do with how files named |
@IanVS, You are right, but it somehow fixes the error. Please try adding it in this repo. Vite 3 works fine with node v14 when "type": "module" is present in package.json |
@sourabh129 is correct. Adding type: module does solve problem on node v14 but I'm not sure why |
it works for me. my node version is 14.15.1. |
What version of
vite
are you using?^2.9.9
System info and storybook versions
System:
OS: Windows 10 10.0.22000
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Binaries:
Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (103.0.1264.62)
npmPackages:
@storybook/addon-actions: ^6.5.9 => 6.5.9
@storybook/addon-essentials: ^6.5.9 => 6.5.9
@storybook/addon-interactions: ^6.5.9 => 6.5.9
@storybook/addon-links: ^6.5.9 => 6.5.9
@storybook/builder-vite: ^0.2.0 => 0.2.0
@storybook/testing-library: 0.0.13 => 0.0.13
@storybook/vue3: ^6.5.9 => 6.5.9
Describe the Bug
I installed storybook on a package project I am working on.
Just ran
npx storybook init
Since the first run of
npm run storybook
there was this error:Link to Minimal Reproducible Example
https://github.com/giusepetroso/test-storybook
Participation
The text was updated successfully, but these errors were encountered: