Skip to content

yarn storybook fails on fresh clone and after running yarn #121

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

Open
ChristineTham opened this issue Mar 28, 2020 · 0 comments
Open

yarn storybook fails on fresh clone and after running yarn #121

ChristineTham opened this issue Mar 28, 2020 · 0 comments

Comments

@ChristineTham
Copy link

yarn run v1.22.0
$ start-storybook
info @storybook/react v5.3.13
info
info => Loading presets
info => Loading presets
info => Loading custom manager config.
info => Loading config/preview file in "./.storybook".
info => Adding stories defined in ".storybook/main.js".
info => Loading custom Webpack config (full-control mode).
info => Using base config because react-scripts is not installed.
Starting type checking service...
Using 1 worker with 2048MB memory limit
Type checking in progress...
webpack built 546310d49df9aa422a83 in 8895ms
✖ 「wdm」: Hash: 546310d49df9aa422a83
Version: webpack 4.41.2
Time: 8895ms
Built at: 03/28/2020 6:18:44 PM
Asset Size Chunks Chunk Names
iframe.html 3.26 KiB [emitted]
main.546310d49df9aa422a83.bundle.js 6.82 KiB main [emitted] [immutable] main
main.546310d49df9aa422a83.bundle.js.map 231 bytes main [emitted] [dev] main
runtimemain.546310d49df9aa422a83.bundle.js 31.2 KiB runtimemain [emitted] [immutable] runtimemain
runtime
main.546310d49df9aa422a83.bundle.js.map 32.3 KiB runtimemain [emitted] [dev] runtimemain
vendorsmain.546310d49df9aa422a83.bundle.js 1.27 MiB vendorsmain [emitted] [immutable] [big] vendorsmain
vendors
main.546310d49df9aa422a83.bundle.js.map 1.08 MiB vendorsmain [emitted] [dev] vendorsmain
Entrypoint main [big] = runtimemain.546310d49df9aa422a83.bundle.js runtimemain.546310d49df9aa422a83.bundle.js.map vendorsmain.546310d49df9aa422a83.bundle.js vendorsmain.546310d49df9aa422a83.bundle.js.map main.546310d49df9aa422a83.bundle.js main.546310d49df9aa422a83.bundle.js.map
[0] multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/preview.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true 76 bytes {main} [built]
[./.storybook/generated-entry.js] 2.09 KiB {main} [built] [failed] [1 error]
[./.storybook/preview.js] 2.08 KiB {main} [built] [failed] [1 error]
[./node_modules/@storybook/core/dist/server/common/polyfills.js] 120 bytes {vendorsmain} [built]
[./node_modules/@storybook/core/dist/server/preview/globals.js] 93 bytes {vendors
main} [built]
[./node_modules/@storybook/core/node_modules/core-js/features/symbol/index.js] 305 bytes {vendorsmain} [built]
[./node_modules/airbnb-js-shims/index.js] 40 bytes {vendors
main} [built]
[./node_modules/global/window.js] 232 bytes {vendorsmain} [built]
[./node_modules/querystring-es3/index.js] 127 bytes {vendors
main} [built]
[./node_modules/regenerator-runtime/runtime.js] 23.5 KiB {vendorsmain} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {vendors
main} [built]
[./node_modules/webpack-hot-middleware/client-overlay.js] (webpack)-hot-middleware/client-overlay.js 2.17 KiB {vendorsmain} [built]
[./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=true] (webpack)-hot-middleware/client.js?reload=true&quiet=true 7.68 KiB {vendors
main} [built]
[./node_modules/webpack-hot-middleware/process-update.js] (webpack)-hot-middleware/process-update.js 4.35 KiB {vendorsmain} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {vendors
main} [built]
+ 700 hidden modules

ERROR in ./.storybook/generated-entry.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/christie/github/gatsby-typescript-emotion-storybook/.storybook/generated-entry.js: babel-preset-gatsby has been loaded, which consumes config generated by the Gatsby CLI. Set NODE_ENV=test to bypass, or run gatsby build first. (While processing: "/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js")
at loadCachedConfig (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js:18:15)
at preset (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js:34:29)
at /Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/full.js:199:14
at Generator.next ()
at Function. (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
at Generator.next ()
at step (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:254:32)
at evaluateAsync (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:284:5)
at Function.errback (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:108:7)
at errback (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/gensync-utils/async.js:70:18)
at async (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:183:31)
at onFirstPause (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:209:13)
at Generator.next ()
at cachedFunction (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/caching.js:68:46)
at cachedFunction.next ()
at loadPresetDescriptor (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/full.js:292:44)
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/preview.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true main[3]

ERROR in ./.storybook/preview.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/christie/github/gatsby-typescript-emotion-storybook/.storybook/preview.js: babel-preset-gatsby has been loaded, which consumes config generated by the Gatsby CLI. Set NODE_ENV=test to bypass, or run gatsby build first. (While processing: "/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js")
at loadCachedConfig (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js:18:15)
at preset (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/babel-preset-gatsby/index.js:34:29)
at /Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/full.js:199:14
at Generator.next ()
at Function. (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
at Generator.next ()
at step (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:254:32)
at evaluateAsync (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:284:5)
at Function.errback (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:108:7)
at errback (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/gensync-utils/async.js:70:18)
at async (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:183:31)
at onFirstPause (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/gensync/index.js:209:13)
at Generator.next ()
at cachedFunction (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/caching.js:68:46)
at cachedFunction.next ()
at loadPresetDescriptor (/Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/@babel/core/lib/config/full.js:292:44)
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/preview.js ./.storybook/generated-entry.js (webpack)-hot-middleware/client.js?reload=true&quiet=true main[2]
Child HtmlWebpackCompiler:
Asset Size Chunks Chunk Names
__child-HtmlWebpackPlugin_0 6.35 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core/dist/server/templates/index.ejs] 2.15 KiB {HtmlWebpackPlugin_0} [built]

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/node_modules/jest-emotion/types/index.d.ts(26,51):
TS2339: Property 'print' does not exist on type 'Plugin'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/components/Button/tests/Button.test.tsx(86,15):
TS2322: Type '{ children: string; tag: string; css: string; to: string; }' is not assignable to type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
Property 'tag' does not exist on type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/components/Button/tests/Button.test.tsx(93,26):
TS2339: Property 'toBeInTheDocument' does not exist on type 'JestMatchersShape<Matchers<void, HTMLAnchorElement | null>, Matchers<Promise, HTMLAnchorElement | null>>'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/components/Button/tests/Button.test.tsx(98,15):
TS2322: Type '{ children: string; tag: string; css: string; to: string; }' is not assignable to type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
Property 'tag' does not exist on type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/components/Button/tests/Button.test.tsx(105,26):
TS2339: Property 'toBeInTheDocument' does not exist on type 'JestMatchersShape<Matchers<void, HTMLAnchorElement | null>, Matchers<Promise, HTMLAnchorElement | null>>'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/components/Button/button.stories.tsx(12,11):
TS2322: Type '{ children: Element; tag: string; to: string; isLoading: true; }' is not assignable to type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
Property 'tag' does not exist on type '(IntrinsicAttributes & { as?: "a" | ComponentClass<{}, any> | FunctionComponent<{}> | typeof GatsbyLink | undefined; ... 6 more ...; stripButtonStyles?: boolean | undefined; } & ClassAttributes<...> & ButtonHTMLAttributes<...>) | (IntrinsicAttributes & ... 3 more ... & { ...; }) | (IntrinsicAttributes & ... 3 more ....'.
ERROR in /Users/christie/github/gatsby-typescript-emotion-storybook/src/utils/i18n/index.ts(1,32):
TS7016: Could not find a declaration file for module './supportedLanguages'. '/Users/christie/github/gatsby-typescript-emotion-storybook/src/utils/i18n/supportedLanguages.js' implicitly has an 'any' type.
Version: typescript 3.8.2
Time: 10087ms

WARN force closed preview build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant