-
Notifications
You must be signed in to change notification settings - Fork 107
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] Unable to compile TypeScript #559
Labels
bug
Something isn't working
Comments
This issue seems similar to #298 but no one yet have a solution. Someone know a workaround for this error? |
What are your |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of
vite
are you using?3.2.5
System info and storybook versions
System:
OS: macOS 12.2
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.13.0/bin/yarn
npm: 9.4.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
Browsers:
Chrome: 109.0.5414.119
Firefox: 109.0
Safari: 15.3
npmPackages:
@storybook/addon-essentials: ^6.5.15 => 6.5.16
@storybook/builder-vite: ^0.2.6 => 0.2.7
@storybook/core-common: ^6.5.16 => 6.5.16
@storybook/core-server: ^6.5.15 => 6.5.16
@storybook/html: ^6.5.15 => 6.5.16
@storybook/web-components: ^6.5.15 => 6.5.16
Describe the Bug
Hello, i'm using nx to manage a monorepo and when i run storybook it give me the following errors:
info @storybook/web-components v6.5.16
info
ERR! TSError: ⨯ Unable to compile TypeScript:
ERR! packages/vehicle-header/.storybook/main.ts:2:47 - error TS2792: Cannot find module '@storybook/core-common'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
ERR!
ERR! 2 import type { StorybookConfig, Options } from '@storybook/core-common';
ERR! ~~~~~~~~~~~~~~~~~~~~~~~~
ERR! packages/vehicle-header/.storybook/main.ts:6:29 - error TS2792: Cannot find module 'vite'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
ERR!
ERR! 6 import { mergeConfig } from 'vite'
ERR! ~~~~~~
ERR! packages/vehicle-header/.storybook/main.ts:7:31 - error TS2792: Cannot find module 'vite-tsconfig-paths'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?
ERR!
ERR! 7 import viteTsConfigPaths from 'vite-tsconfig-paths'
Do you know how can i resolve this issue?
Link to Minimal Reproducible Example
No response
Participation
The text was updated successfully, but these errors were encountered: