Skip to content
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

Error: You gave us a visitor for the node type StaticBlock but it's not a valid type #12893

Closed
md-seb opened this issue Oct 23, 2020 · 19 comments
Labels
bug cra Prioritize create-react-app compatibility dependencies has workaround react yarn / npm Yarn / npm acting weird

Comments

@md-seb
Copy link

md-seb commented Oct 23, 2020

Cannot run storybook in a vanilla create-react-app. It appears to install correctly, but fails on npm run storybook

To Reproduce

  1. run cd /tmp && npx create-react-app storytest && cd storytest && npx sb init && npm run storybook
  2. This errors with
ERROR in ./.storybook/generated-refs.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: You gave us a visitor for the node type StaticBlock but it's not a valid type

Expected behavior
Storybook is running

Code snippets
Full log:

% cd /tmp && npx create-react-app storytest && cd storytest && npx sb init && npm run storybook

Creating a new React app in /private/tmp/storytest.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

yarn add v1.22.5
[1/4] 🔍  Resolving packages...
warning react-scripts > workbox-webpack-plugin > workbox-build > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
warning react-scripts > jest-circus > jest-runner > jest-config > jest-environment-jsdom > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning react-scripts > jest-circus > jest-runner > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] 🔨  Building fresh packages...
[1/5] ⠄ fsevents
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
warning Error running install script for optional dependency: "/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.8.5 found at \"/usr/local/opt/[email protected]/bin/python3.8\"
gyp info spawn /usr/local/opt/[email protected]/bin/python3.8
gyp info spawn args [ '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/Library/Caches/node-gyp/10.22.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/seb/Library/Caches/node-gyp/10.22.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/seb/Library/Caches/node-gyp/10.22.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command \"/Users/seb/.nvm/versions/node/v10.22.0/bin/node\" \"/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
success Saved lockfile.
success Saved 340 new dependencies.
info Direct dependencies
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @bcoe/[email protected]
├─ @eslint/[email protected]
├─ @hapi/[email protected]
├─ @istanbuljs/[email protected]
├─ @jest/[email protected]
├─ @jest/[email protected]
├─ @jest/[email protected]
├─ @jest/[email protected]
├─ @nodelib/[email protected]
├─ @nodelib/[email protected]
├─ @nodelib/[email protected]
├─ @npmcli/[email protected]
├─ @pmmmwh/[email protected]
├─ @rollup/[email protected]
├─ @rollup/[email protected]
├─ @sinonjs/[email protected]
├─ @sinonjs/[email protected]
├─ @surma/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @svgr/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @typescript-eslint/[email protected]
├─ @typescript-eslint/[email protected]
├─ @typescript-eslint/[email protected]
├─ @webassemblyjs/[email protected]
├─ @webassemblyjs/[email protected]
├─ @webassemblyjs/[email protected]
├─ @webassemblyjs/[email protected]
├─ @webassemblyjs/[email protected]
├─ @webassemblyjs/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨  Done in 18.78s.

Initialized a git repository.

Installing template dependencies using yarnpkg...
yarn add v1.22.5
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
[4/4] 🔨  Building fresh packages...
warning Error running install script for optional dependency: "/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.8.5 found at \"/usr/local/opt/[email protected]/bin/python3.8\"
gyp info spawn /usr/local/opt/[email protected]/bin/python3.8
gyp info spawn args [ '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/Library/Caches/node-gyp/10.22.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/seb/Library/Caches/node-gyp/10.22.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/seb/Library/Caches/node-gyp/10.22.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command \"/Users/seb/.nvm/versions/node/v10.22.0/bin/node\" \"/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v10.22.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok"
info This module is OPTIONAL, you can safely ignore this error
success Saved lockfile.
success Saved 17 new dependencies.
info Direct dependencies
├─ @testing-library/[email protected]
├─ @testing-library/[email protected]
├─ @testing-library/[email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @testing-library/[email protected]
├─ @testing-library/[email protected]
├─ @testing-library/[email protected]
├─ @testing-library/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨  Done in 5.52s.
Removing template package using yarnpkg...

yarn remove v1.22.5
[1/2] 🗑  Removing module cra-template...
[2/2] 🔨  Regenerating lockfile and installing missing dependencies...
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[-/5] ⠄ waiting...
[2/5] ⠄ fsevents
[-/5] ⠄ waiting...
[-/5] ⠄ waiting...
warning Error running install script for optional dependency: "/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.8.5 found at \"/usr/local/opt/[email protected]/bin/python3.8\"
gyp info spawn /usr/local/opt/[email protected]/bin/python3.8
gyp info spawn args [ '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/Library/Caches/node-gyp/10.22.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/seb/Library/Caches/node-gyp/10.22.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/seb/Library/Caches/node-gyp/10.22.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command \"/Users/seb/.nvm/versions/node/v10.22.0/bin/node\" \"/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
success Uninstalled packages.
✨  Done in 5.02s.

Created git commit.

Success! Created storytest at /private/tmp/storytest
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd storytest
  yarn start

Happy hacking!

 sb init - the simplest way to add a Storybook to your project.

 • Detecting project type. ✓
yarn add v1.22.5
[1/4] 🔍  Resolving packages...
warning @storybook/react > @storybook/core > @storybook/components > [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
warning @storybook/react > @storybook/core > @storybook/components > react-popper-tooltip > react-popper > [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning " > [email protected]" has unmet peer dependency "webpack@>=2".
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning "@storybook/react > [email protected]" has unmet peer dependency "typescript@>= 3.x".
warning "@storybook/react > react-docgen-typescript-plugin > [email protected]" has unmet peer dependency "typescript@>= 3.x".
warning "@storybook/react > react-docgen-typescript-plugin > [email protected]" has unmet peer dependency "typescript@*".
warning "@storybook/react > @storybook/addons > @storybook/api > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 16.4.0-alpha.0911da3".
warning " > @storybook/[email protected]" has incorrect peer dependency "react@^16.8.0".
warning " > @storybook/[email protected]" has incorrect peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/[email protected]" has incorrect peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/addon-docs > @mdx-js/[email protected]" has incorrect peer dependency "react@^16.13.1".
warning "@storybook/addon-essentials > @storybook/addon-docs > [email protected]" has incorrect peer dependency "react@^0.14.8 || ^15.0.1 || ^16.0.0".
warning "@storybook/addon-essentials > @storybook/addon-docs > [email protected]" has incorrect peer dependency "react-dom@^0.14.8 || ^15.0.1 || ^16.0.0".
[4/4] 🔨  Building fresh packages...
[1/3] ⠠ fsevents
[-/3] ⠠ waiting...
warning Error running install script for optional dependency: "/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 3.8.5 found at \"/usr/local/opt/[email protected]/bin/python3.8\"
gyp info spawn /usr/local/opt/[email protected]/bin/python3.8
gyp info spawn args [ '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/seb/Library/Caches/node-gyp/10.22.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/seb/Library/Caches/node-gyp/10.22.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/seb/Library/Caches/node-gyp/10.22.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/private/tmp/storytest/node_modules/chokidar/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.



gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command \"/Users/seb/.nvm/versions/node/v10.22.0/bin/node\" \"/Users/seb/.nvm/versions/node/v10.22.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /private/tmp/storytest/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v10.22.0
gyp ERR! node-gyp -v v5.1.0
success Saved lockfile.
success Saved 246 new dependencies.
info Direct dependencies
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
└─ @storybook/[email protected]
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @base2/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @emotion/[email protected]
├─ @icons/[email protected]
├─ @mdx-js/[email protected]
├─ @mdx-js/[email protected]
├─ @mdx-js/[email protected]
├─ @mrmlnc/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @storybook/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @webpack-contrib/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
✨  Done in 19.55s.
. ✓
 • Preparing to install dependencies. ✓


yarn install v1.22.5
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.54s.
. ✓

To run your Storybook, type:

   yarn storybook

For more information visit: https://storybook.js.org


> [email protected] storybook /private/tmp/storytest
> start-storybook -p 6006 -s public

info @storybook/react v6.0.27
info
info => Loading static files from: /private/tmp/storytest/public .
info => Loading presets
info => Loading presets
info => Loading config/preview file in "./.storybook".
info => Loading config/preview file in "./.storybook".
info => Adding stories defined in ".storybook/main.js".
info => Loading Webpack configuration from `node_modules/react-scripts`
info => Removing existing JavaScript and TypeScript rules.
ERR! Error: You gave us a visitor for the node type StaticBlock but it's not a valid type
ERR!     at verify (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:112:13)
ERR!     at explode (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:34:3)
ERR!     at Object.merge (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:147:5)
ERR!     at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-replace-supers/lib/index.js:60:44)
ERR!     at Module._compile (internal/modules/cjs/loader.js:778:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:653:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
ERR!     at Module.require (internal/modules/cjs/loader.js:692:17)
ERR!     at require (internal/modules/cjs/helpers.js:25:18)
ERR!     at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js:13:52)
ERR!     at Module._compile (internal/modules/cjs/loader.js:778:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:653:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
ERR!  { Error: You gave us a visitor for the node type StaticBlock but it's not a valid type
ERR!     at verify (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:112:13)
ERR!     at explode (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:34:3)
ERR!     at Object.merge (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:147:5)
ERR!     at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-replace-supers/lib/index.js:60:44)
ERR!     at Module._compile (internal/modules/cjs/loader.js:778:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:653:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
ERR!     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
ERR!     at Module.require (internal/modules/cjs/loader.js:692:17)
ERR!     at require (internal/modules/cjs/helpers.js:25:18)
ERR!     at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js:13:52)
ERR!     at Module._compile (internal/modules/cjs/loader.js:778:30)
ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
ERR!     at Module.load (internal/modules/cjs/loader.js:653:32)
ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
ERR!   stack:
ERR!    'Error: You gave us a visitor for the node type StaticBlock but it\'s not a valid type\n    at verify (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:112:13)\n    at explode (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:34:3)\n    at Object.merge (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:147:5)\n    at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-replace-supers/lib/index.js:60:44)\n    at Module._compile (internal/modules/cjs/loader.js:778:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n    at Module.load (internal/modules/cjs/loader.js:653:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:585:3)\n    at Module.require (internal/modules/cjs/loader.js:692:17)\n    at require (internal/modules/cjs/helpers.js:25:18)\n    at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js:13:52)\n    at Module._compile (internal/modules/cjs/loader.js:778:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n    at Module.load (internal/modules/cjs/loader.js:653:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)' }

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

✖ 「wdm」: Hash: 0e4f3c002878642377f1
Version: webpack 4.44.2
Time: 2685ms
Built at: 10/23/2020 9:21:46 PM
                                      Asset      Size        Chunks                                Chunk Names
                                 index.html  2.79 KiB                [emitted]
        main.39c3733cb1f7e3197bf4.bundle.js  82.5 KiB          main  [emitted] [immutable]         main
runtime~main.99691078705b39185f99.bundle.js  6.12 KiB  runtime~main  [emitted] [immutable]         runtime~main
vendors~main.968cd903e9a16b088700.bundle.js  3.02 MiB  vendors~main  [emitted] [immutable]  [big]  vendors~main
Entrypoint main [big] = runtime~main.99691078705b39185f99.bundle.js vendors~main.968cd903e9a16b088700.bundle.js main.39c3733cb1f7e3197bf4.bundle.js
[0] multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/client/manager/index.js ./node_modules/@storybook/addon-links/dist/register.js ./node_modules/@storybook/addon-actions/dist/register.js ./node_modules/@storybook/addon-docs/dist/register.js ./node_modules/@storybook/addon-controls/dist/register.js ./node_modules/@storybook/addon-backgrounds/dist/register.js ./node_modules/@storybook/addon-viewport/dist/register.js ./node_modules/@storybook/addon-toolbars/dist/register.js ./.storybook/generated-refs.js 136 bytes {main} [built]
[./.storybook/generated-refs.js] 1.38 KiB {main} [built] [failed] [1 error]
[./node_modules/@storybook/addon-actions/dist/constants.js] 541 bytes {vendors~main} [built]
[./node_modules/@storybook/addon-actions/dist/containers/ActionLogger/index.js] 8.63 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-actions/dist/register.js] 804 bytes {vendors~main} [built]
[./node_modules/@storybook/addon-backgrounds/dist/constants.js] 452 bytes {vendors~main} [built]
[./node_modules/@storybook/addon-backgrounds/dist/containers/BackgroundSelector.js] 13.2 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-backgrounds/dist/register.js] 2.18 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-controls/dist/register.js] 2.34 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-docs/dist/register.js] 1.99 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-links/dist/register.js] 1.92 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-toolbars/dist/register.js] 2.01 KiB {vendors~main} [built]
[./node_modules/@storybook/addon-viewport/dist/register.js] 1.92 KiB {vendors~main} [built]
[./node_modules/@storybook/core/dist/client/manager/index.js] 521 bytes {vendors~main} [built]
[./node_modules/@storybook/core/dist/server/common/polyfills.js] 120 bytes {vendors~main} [built]
    + 511 hidden modules

ERROR in ./.storybook/generated-refs.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: You gave us a visitor for the node type StaticBlock but it's not a valid type
    at verify (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:112:13)
    at explode (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:34:3)
    at Object.merge (/private/tmp/storytest/node_modules/@babel/traverse/lib/visitors.js:147:5)
    at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-replace-supers/lib/index.js:60:44)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/private/tmp/storytest/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js:13:52)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/client/manager/index.js ./node_modules/@storybook/addon-links/dist/register.js ./node_modules/@storybook/addon-actions/dist/register.js ./node_modules/@storybook/addon-docs/dist/register.js ./node_modules/@storybook/addon-controls/dist/register.js ./node_modules/@storybook/addon-backgrounds/dist/register.js ./node_modules/@storybook/addon-viewport/dist/register.js ./node_modules/@storybook/addon-toolbars/dist/register.js ./.storybook/generated-refs.js main[9]
Child HtmlWebpackCompiler:
                          Asset      Size               Chunks  Chunk Names
    __child-HtmlWebpackPlugin_0  6.32 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.11 KiB {HtmlWebpackPlugin_0} [built]
WARN Unable to close preview build!
^C
/tmp/storytest %

System

Environment Info:

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 10.22.0 - ~/.nvm/versions/node/v10.22.0/bin/node
    Yarn: 1.22.5 - ~/.nvm/versions/node/v10.22.0/bin/yarn
    npm: 6.14.6 - ~/.nvm/versions/node/v10.22.0/bin/npm
  Browsers:
    Chrome: 86.0.4240.111
    Firefox: 78.0.2
    Safari: 14.0
  npmPackages:
    @storybook/addon-actions: ^6.0.27 => 6.0.27
    @storybook/addon-essentials: ^6.0.27 => 6.0.27
    @storybook/addon-links: ^6.0.27 => 6.0.27
    @storybook/node-logger: ^6.0.27 => 6.0.27
    @storybook/preset-create-react-app: ^3.1.4 => 3.1.4
    @storybook/react: ^6.0.27 => 6.0.27

Additional context
None

@shilman shilman added react cra Prioritize create-react-app compatibility bug P0 has workaround labels Oct 24, 2020
@shilman
Copy link
Member

shilman commented Oct 24, 2020

The following fixes it for me:

rm yarn.lock && yarn

I think there's a babel version inconsistency between CRA@4 and Storybook@6, but I'm not sure what's the proper fix.

@shilman shilman added dependencies yarn / npm Yarn / npm acting weird labels Oct 24, 2020
@shilman
Copy link
Member

shilman commented Oct 26, 2020

NOTE: this is hopefully fixed in 6.1 ☝️ . We need to get it back into the stable release, but are having problems with repros in CI. In the meantime if people can upgrade to 6.1 to test it out, please give it a try and report back:

npx sb upgrade --prerelease

If it doesn't work right away, try removing regenerating lockfiles.

@martinpesout
Copy link

I'm getting the same problem. But for me I started to see You gave us a visitor for the node type StaticBlock but it's not a valid type error after upgrading to 6.1 from 6.0.26.

@koop
Copy link
Contributor

koop commented Nov 20, 2020

Seeing this reliably when upgrading from 6.1.0-alpha.22 to 6.1.1 — regenerating the lockfile doesn’t help. We’re not using CRA, but we are using babel for building our code outside of Storybook. I’ll update if I find a specific Babel version/config that fixes the issue.

@koop
Copy link
Contributor

koop commented Nov 21, 2020

Removing node_modules fixed the issue for me.

Rebuilding my yarn.lock was not enough. Here's why:

  • The error we're running into is that Babel is being asked to visit a node type that it doesn't know about (StaticBlock).
  • The plugin that causes the error is @babel/helper-replace-supers — but it looks to make sure the StaticBlock node type is available in @babel/types before adding the visitor.
  • When the visitor is run in @babel/traverse, the StaticBlock node type is mysteriously gone. This is because @babel/helper-replace-supers and @babel/traverse use different installations of @babel/types.
  • These versions got out of sync. StaticBlock was only recently added to Babel in v7.12.0. @babel/helper-replace-supers had v7.12.1 installed at ./node_modules/@storybook/core/node_modules/@babel/types, while @babel/traverse was using the older v7.11.0 at ./node_modules/@storybook/core/node_modules/@babel/traverse/node_modules/@babel/types.
  • Since @babel/traverse has the correct dependency specified it's just a matter of replacing node_modules.

I think it's safe to mark this closed.

@shilman
Copy link
Member

shilman commented Nov 21, 2020

Great detective work @koop. Thanks so much, closing!

@jazzfog
Copy link

jazzfog commented Mar 20, 2021

Same here, just rm yarn.lock && yarn did not work but also deleting node_modules did the trick.

Run from the app directory:

rm -rf ./node_modules && rm yarn.lock && yarn

@maksnester
Copy link

maksnester commented Jan 7, 2022

rm -rf ./node_modules && yarn install --force

worked for me without removing yarn.lock

@lucasfelixc
Copy link

lucasfelixc commented May 19, 2022

My error is

Error: [BABEL] /vercel/path0/src/index.tsx: You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type

but none of the indications worked for me :(

@tjweihra
Copy link

My error is

Error: [BABEL] /vercel/path0/src/index.tsx: You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type

but none of the indications worked for me :(

Getting this same issue on a new expo typescript project

@lucasfelixc
Copy link

@tjweihra what's the version of your react-scripts package? I updated mine to 5.0.1 and it solved. But now I have a new error:

Module not found: Error: Can't resolve '/vercel/path0/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js' in '/vercel/path0/src/styles

@tjweihra
Copy link

tjweihra commented May 20, 2022

@lucasfelixc I just found the issue, my global npm version for expo-cli was 4.x.x, after upgrading i'm now on version 5.4.6. It seems to have fixed my issue, apologies if that doesn't help.

@TalGriman
Copy link

TalGriman commented May 20, 2022

node_modules@react-navigation\native\src\index.tsx: [BABEL] E:\development\zionet\react-native\expo-cli\flights\node_modules@react-navigation\native\src\index.tsx: You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type

this is my error today, 2 days ago all worked fine while opened projects...
today every project this error :(
will be thanksfull for help.

@TalGriman
Copy link

tjweihra

update the global expo looks like it work, tnx a lot!

@PauloJorgeS
Copy link

I got :

Error: [BABEL] /**/client/src/index.tsx: You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type
    at Generator.next (<anonymous>)
    at Generator.next (<anonymous>)

Still don't get what is the problem. I try to update the react-scripts to "5.0.0"

@andrew-aladev
Copy link

andrew-aladev commented May 20, 2022

You gave us a visitor for the node type TSInstantiationExpression

I've received the same error during global update of project packages. It means babel runtime or one of its part is too old. You have to keep react-script 3.4.4 for now and try to update other packages. The same scenario should be used for other packages.

You should estimate large amount of time for any project packages update. For my case: I should find an ideal balance between 6800 package dependecies (including parts of babel).

@davidfirst
Copy link

davidfirst commented May 20, 2022

I started getting the same error today (worked fine yesterday):

You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type

In my case, I use babel programmatically to compile typescript. I don't use react-script nor expo-cli. so none of the solutions above could help.

Edit: many babel packages were updated to 7.18.0 yesterday. One of the merged PRs is Add support for instantiation expressions , it might be related.

@wibb36
Copy link

wibb36 commented May 23, 2022

2 days ago was working, now babel broke the internet. I just wasted a day and still unresolved. I'm getting the error in a Next.js project using (expo) & babel.

I updated Expo-cli to 5.4.6 and all that is suggested above, no solution.

Error: [BABEL] .../pages/_app.tsx: You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type 

at Generator.next (<anonymous>)

Any solution even temporary?

@wyattades
Copy link

Forcing @babel/core and @babel/types back to version 7.17 fixed the issue for me, although it feels hacky...

Add the resolutions to package.json:

  "resolutions": {
    "@babel/core": "7.17.12",
    "@babel/types": "7.17.12"
  }

Then rm -rf node_modules && yarn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cra Prioritize create-react-app compatibility dependencies has workaround react yarn / npm Yarn / npm acting weird
Projects
None yet
Development

No branches or pull requests

15 participants