Skip to content

Uncaught ReferenceError: global is not defined when served from vite dev server #5912

Answered by Niputi
olejorgenb asked this question in Q&A
Discussion options

You must be logged in to vote
  • you can force a newer version sub dependencies which are outdated
  • Vite is not going to add polyfills for nodejs builtins
  • global is a node builtin which libraries should not depend on
  • you will need to add a polyfill for global if you have dependencies which are not browser friendly

please open a issue at storybook regarding that outdated dependency

Replies: 9 comments 20 replies

Comment options

You must be logged in to vote
2 replies
@gamliela
Comment options

@danvc
Comment options

Answer selected by Niputi
Comment options

You must be logged in to vote
7 replies
@SchDen
Comment options

@TimDaub
Comment options

@magnus-bakke
Comment options

@Ashraf-ul-I
Comment options

@ashishnex007
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@TimDaub
Comment options

@ItsTonyDavid
Comment options

@aprilmintacpineda
Comment options

@phanthanhluc24
Comment options

Comment options

You must be logged in to vote
1 reply
@zbyte64
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@JayDouglass
Comment options

@lediokoci1
Comment options

@jaemdessources
Comment options

@Kane-R-G
Comment options

Comment options

You must be logged in to vote
2 replies
@Duzbee
Comment options

@524c
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet