storybook: @storybook 5.1.1 is throwing an error on build
Just upgraded to 5.1.1 from 5.0.1 and the build fails.
I downgraded to 5.0.1, removed my nodes_modules folder and reinstall all my packages but the issues remain.
I’ve never installed the core-js package before and even after installing it the issues remain.
System:
- OS: MacOS
- Device: Macbook Pro 2016
- Framework: vue
- Version: 2.6.6
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 56
- Comments: 75 (24 by maintainers)
Commits related to this issue
- Now experiencing issue as described here: https://github.com/storybookjs/storybook/issues/6984 — committed to servexyz/react-native-expo-storybook-v5 by alechp 5 years ago
After installing
core-js@^2.5.7it works again 😃Thanks to this post: https://stackoverflow.com/a/55313456/3906770
Following.
We’re still experiencing this issue. Interestingly it works on 5.0.11 and 5.2.0-alpha.23 but not 5.1.x.
Here is a sample project setup for 5.1.9 that is broken if you have a chance to have a look.
https://github.com/nigelsim/storybook-6984
I deleted both
package-lock.jsonand mynode_modules/.I’m using react-native storybook, and just upgraded from v4 to v5 with the following steps:
Then @storybook/react-native-server also gave me the same error in the issue reported at the top. Installing
"core-js": "^3.1.3"afterwards works to help me remove the error.I had similar situation too. In my case install
core-js@2.5.7didn’t solve the problem, instead installcore-js@3.1.3worked for me.I found my project had error about dependented
core-js/modules/web.dom-collections.for-each.This file above is only in
core-js@3.xso intallingcore-js@3.1.3worked for me.I don’t know well why this version defference happened though. I’m using custom webpack config so maybe it my be a cause.
I hope this helps.
@JonathanSpeek if you can change that file, so it maps to the new core-js paths, it should work!
maps to
I worked around now by copying ALL the contents from core-js@2.6.5
modulesfolder into my core-js3modulesfolder… e.g.:hmm still same:
Getting the same issue as well in our GatsbyJS project
Dependencies
Storybook config
Webpack config
Still experiencing same problem at
5.2.1Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.5 containing PR #7086 that references this issue. Upgrade today to try it out!
Closing this issue. Please re-open if you think there’s still more to do.
ZOMG!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.4 containing PR #7051 that references this issue. Upgrade today to try it out!
Closing this issue. Please re-open if you think there’s still more to do.
Here is reproducible repo:-
https://github.com/umakantp/demo-reproJust clone it and do
npm install && npm run start. Would happy if anyone can let me know if they can reproduce this issue or not.Unfortunately, reverting to ❤️ doesn’t work for me. I’ve also deleted my
package-lock.jsonand deleted mynode_modulesfolder with a fresh install. Can’t use5.0.11anymore either after trying to upgrade to5.1.1@ChucKN0risK @JonathanSpeek For debugging purposes, can you try regenerating your lock file?
I was banging my head against errors like this with storybook 6.1.11
npm i core-jsand it was fixed ¯_(ツ)_/¯
export ADBLOCK=1 && npm i
and thousands of lines like this
Version 5.1.8 - fresh install as in my comment above:
Errors:
package.json
Working on this
Looks like something is happening in the core-js project around that message that gets logged 20x
https://github.com/zloirock/core-js/issues/548
I had to copy my
.babelrcfile into the.storybookdirectory which was recommended here: https://github.com/storybookjs/storybook/issues/6204#issuecomment-490991488Also, if you’re having trouble with Babel, we have to specify a corejs version now. Here is my setup if that helps:
.babelrc
package.json