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:
I'm experiencing this same issue.
System:
OS: MacOS
Device: Macbook Pro 2017
Framework: React
Version: 16.4.0
@ChucKN0risK @JonathanSpeek For debugging purposes, can you try regenerating your lock file?
@shilman I deleted my yarn.lock
and package-lock.json
files and runned yarn install
but the issue remains.
I deleted both package-lock.json
and my node_modules/
.
Following.
Does anybody have a repo that we could look at to try to debug?
Unfortunately mine is a private repo π¬
Mine too π
After installing core-js@^2.5.7
it works again π
Thanks to this post: https://stackoverflow.com/a/55313456/3906770
Do you have got a custom webpack config possibly?
Getting the same issue as well in our GatsbyJS project
Dependencies
{
"devDependencies": {
"@storybook/addon-actions": "5.1.1",
"@storybook/addon-links": "5.1.1",
"@storybook/addon-storyshots": "5.1.1",
"@storybook/addon-storyshots-puppeteer": "5.1.1",
"@storybook/addons": "5.1.1",
"@storybook/react": "5.1.1",
"@types/storybook__addon-actions": "^3.4.3",
"@types/storybook__react": "^4.0.2"
}
}
Storybook config
import React from "react";
import { configure, addDecorator, addParameters } from "@storybook/react";
import Reset from "../src/ui/Reset";
import { Box } from "../src/ui/layout";
function loadStories() {
const req = require.context("../src", true, /\.stories\.tsx$/);
req.keys().forEach(filename => req(filename));
}
addParameters({
options: {
showPanel: false
}
});
addDecorator(storyFn => (
<>
<Reset />
<Box gutterV={0.5} gutterH={0.5} layout="block">
{storyFn()}
</Box>
</>
));
configure(loadStories, module);
Webpack config
module.exports = ({ config }) => {
config.module.rules.push({
test: /\.tsx?$/,
use: [
{
loader: "awesome-typescript-loader",
options: {
transpileOnly: true,
useBabel: true,
babelCore: "@babel/core"
}
}
]
});
config.resolve.extensions.push(".ts", ".tsx");
return config;
};
I had similar situation too.
In my case install [email protected]
didn't solve the problem, instead install [email protected]
worked for me.
I found my project had error about dependented core-js/modules/web.dom-collections.for-each
.
This file above is only in [email protected]
so intalling [email protected]
worked 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.
environment
@storybook/vue: 5.0.5 > 5.1.1
Vue.js: 2.8.1
babel-core: 7.0.0-bridge.0
Similar situation here with me. Below are the details for repro. Hope it helps.
package.json contains:-
"dependencies": {
"babel-plugin-module-resolver": "3.2.0",
"babel-polyfill": "6.26.0"
},
"devDependencies": {
"@babel/cli": "7.4.4",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "7.4.4",
"@babel/plugin-proposal-decorators": "7.4.4",
"@babel/plugin-proposal-object-rest-spread": "7.4.4",
"@babel/plugin-syntax-async-generators": "7.2.0",
"@babel/preset-env": "7.4.5",
"@babel/preset-react": "7.0.0",
"@dump247/storybook-state": "1.6.0",
"@storybook/addon-actions": "5.1.1",
"@storybook/addon-links": "5.1.1",
"@storybook/addons": "5.1.1",
"@storybook/react": "5.1.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.8.0",
"babel-loader": "8.0.6",
"css-loader": "2.1.1",
"eslint": "5.16.0",
"eslint-plugin-react": "7.13.0",
"eslint-plugin-react-hooks": "1.6.0",
"husky": "2.4.0",
"lint-staged": "8.1.7",
"node-sass": "4.12.0",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-hot-loader": "4.9.0",
"react-onclickoutside": "^6.8.0",
"react-router-dom": "^5.0.1",
"sass-loader": "7.1.0",
"style-loader": "0.23.1"
}
.storybook/webpack.config.js contains:-
const path = require('path')
module.exports = async ({config, mode}) => {
config.module.rules.push({
test: /\.scss$/,
use: [{
loader: 'style-loader'
}, {
loader: 'css-loader'
}, {
loader: 'sass-loader',
options: {
includePaths: [path.resolve(__dirname, '../src')]
}
}],
include: path.resolve(__dirname, '../')
})
return config;
}
.storybook/config.js contains:-
import React from 'react'
import { configure } from '@storybook/react'
import 'babel-polyfill'
import '../src/styles/_index.scss'
const req = require.context('../stories', true, /.stories.js$/)
function loadStories() {
req.keys().forEach(filename => req(filename))
}
configure(loadStories, module);
.storybook/addons.js contains:-
import '@storybook/addon-actions/register'
import '@storybook/addon-links/register'
import '@dump247/storybook-state/register'
As the OP said, I was trying to upgrade from 5.0.1
to 5.1.1
. I've tried using core-js@^2.5.7
and core-js@^3.1.3
with both Storybook versions. I've also removed (apparently not entirely) Node/NPM/NVM from my machine twice and I'm still getting the same issues even after pulling down a working branch to my machine π€·π»ββοΈIt still works on other machines that didn't try to upgrade. Weird.
Here's my package.json
:
"dependencies": {
"classnames": "2.2.6",
"downshift": "^1.31.14",
"flatpickr": "4.5.5",
"focus-trap-react": "^6.0.0",
"invariant": "^2.2.3",
"lodash.debounce": "^4.0.8",
"lodash.isequal": "^4.5.0",
"lodash.omit": "^4.5.0",
"ncp": "^2.0.0",
"react-markdown": "^4.0.2",
"scss-to-json": "^2.0.0",
"warning": "^3.0.0",
"window-or-global": "^1.0.1"
},
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/plugin-external-helpers": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-decorators": "^7.2.0",
"@babel/plugin-proposal-do-expressions": "^7.2.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-export-namespace-from": "^7.2.0",
"@babel/plugin-proposal-function-sent": "^7.2.0",
"@babel/plugin-proposal-json-strings": "^7.2.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.2.0",
"@babel/plugin-proposal-numeric-separator": "^7.2.0",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/plugin-proposal-pipeline-operator": "^7.2.0",
"@babel/plugin-proposal-throw-expressions": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/preset-env": "^7.4.3",
"@babel/preset-react": "^7.0.0",
"@storybook/addon-a11y": "~5.1.1",
"@storybook/addon-actions": "~5.1.1",
"@storybook/addon-backgrounds": "~5.1.1",
"@storybook/addon-info": "~5.1.1",
"@storybook/addon-knobs": "~5.1.1",
"@storybook/addon-links": "~5.1.1",
"@storybook/addon-options": "~5.1.1",
"@storybook/addon-viewport": "^5.1.1",
"@storybook/addons": "~5.1.1",
"@storybook/react": "~5.1.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.4",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-react-docgen": "^2.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.0",
"bowser": "^1.6.1",
"chalk": "^2.3.0",
"cli-table": "^0.3.0",
"commitizen": "^2.9.5",
"cross-env": "^5.2.0",
"css-loader": "^1.0.1",
"cz-conventional-changelog-components": "^1.0.0",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.16.0",
"eslint-plugin-jsdoc": "^4.8.3",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"gzip-size": "^5.0.0",
"jest": "^24.0.0",
"jest-circus": "^24.0.0",
"lcov2badge": "^0.1.0",
"lint-staged": "^8.0.0",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "4.10.0",
"npm-git-publish": "^0.2.4-beta",
"object-assign": "^4.1.1",
"postcss-loader": "^3.0.0",
"prettier": "^1.16.0",
"promise": "^8.0.1",
"prop-types": "^15.7.2",
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-test-renderer": "^16.4.0",
"requestanimationframe": "^0.0.23",
"rimraf": "^2.6.3",
"rollup": "^1.10.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-sizes": "^0.5.0",
"rollup-plugin-terser": "^4.0.0",
"sass-loader": "^7.1.0",
"storybook-readme": "^5.0.3",
"string-replace-loader": "^2.1.0",
"terser-webpack-plugin": "^1.1.0",
"webpack": "^4.25.1",
"whatwg-fetch": "^2.0.3"
},
Here's my .storybook/addons.js
:
import '@storybook/addon-actions/register';
import '@storybook/addon-backgrounds/register';
import '@storybook/addon-knobs/register';
import '@storybook/addon-links/register';
import '@storybook/addon-a11y/register';
import '@storybook/addon-options/register';
import '@storybook/addon-viewport/register';
Here's my .storybook/webpack.config.js
:
const path = require('path');
module.exports = ({ config, mode, env }) => {
config.module.rules.push({
test: /\.scss$/,
sideEffects: true,
use: [
{ loader: 'style-loader' },
{
loader: 'css-loader',
options: { importLoaders: 2 },
},
{
loader: 'postcss-loader',
options: {
plugins: () => [
require('autoprefixer')({
browsers: ['last 1 version', 'ie >= 11'],
}),
],
},
},
{
loader: 'sass-loader',
options: {
includePaths: [path.resolve(__dirname, '..', 'node_modules')],
},
},
],
});
config.module.rules.push({
test: /\.(ttf|eot|woff|woff2)$/,
use: {
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]',
},
},
});
config.module.rules.push({
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader'
});
return config;
};
I'm taking a look now whether I can fix this.
I need all possible missing core-js modules/files listed, so please respond if you see one missing not listed yet:
core-js/modules/web.dom-collections.for-each
I could also use a repo to reproduce this on.
Current work around involves adding core-js with a < 3 version in your package.json
@ndelangen I'm not sure if this is helpful:
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es6.array.fill' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 5:0-41
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es6.array.find-index' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 13:0-47
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es6.string.includes' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 7:0-46
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es6.string.trim' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 9:0-42
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es7.array.includes' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 3:0-45
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./.storybook/polyfills.js
Module not found: Error: Can't resolve 'core-js/modules/es7.object.values' in '/Users/m_658043/workspace/bonsai-components-react/.storybook'
@ ./.storybook/polyfills.js 11:0-44
@ ./.storybook/Container.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true
Unfortunately, reverting to <3 doesn't work for me. I've also deleted my package-lock.json
and deleted my node_modules
folder with a fresh install. Can't use 5.0.11
anymore either after trying to upgrade to 5.1.1
Found a workaround:
package.json
& package-lock.json
from before the 5.1.1 upgrade attemptnode_modules
npm i
back in business.
I've also pulled-down what was a working repo as of 2 days ago, onto another machine and am facing these same issues. I'm not sure how that's happening (maybe I'm naive here) when I've specified versions of packages that were all previously working together. π€·π»ββοΈ
Hey all @ndelangen is on the case here. If you have stack traces or public repros, please post them here to help the debugging process. π
wish I could help more, but everything is private
in my case it was because of
https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2
@ndelangen let me know what else might be helpful. Here's what I get from npm i
β npm i
npm WARN deprecated [email protected]: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated [email protected]: use String.prototype.padStart()
> [email protected] install /Users/jonathan/workspace/components-react/node_modules/fsevents
> node install
node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/Users/jonathan/workspace/components-react/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote
> [email protected] install /Users/jonathan/workspace/components-react/node_modules/scss-to-json/node_modules/node-sass
> node scripts/install.js
Cached binary found at /Users/jonathan/.npm/node-sass/4.12.0/darwin-x64-64_binding.node
> [email protected] install /Users/jonathan/workspace/components-react/node_modules/node-sass
> node scripts/install.js
Cached binary found at /Users/jonathan/.npm/node-sass/4.10.0/darwin-x64-64_binding.node
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/@storybook/addon-viewport/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/@storybook/api/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/core-js-pure
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/simplebar/node_modules/core-js
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/spawn-sync
> node postinstall
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/scss-to-json/node_modules/node-sass
> node scripts/build.js
(node:14048) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
Binary found at /Users/jonathan/workspace/components-react/node_modules/scss-to-json/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/commitizen
> opencollective postinstall
Thanks for installing commitizen π
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 70
Number of backers: 5
Annual budget: $46
Current balance: $46
π Donate: https://opencollective.com/commitizen/donate
> [email protected] postinstall /Users/jonathan/workspace/components-react/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/jonathan/workspace/components-react/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
> [email protected] prepublish /Users/jonathan/workspace/components-react
> yarn build
yarn run v1.16.0
$ npm run sassToJs && node scripts/build.js
npm WARN lifecycle The node binary used for scripts is /var/folders/v3/wldyfgh51lx4mdlr36v7n4fc0000gq/T/yarn--1559844429366-0.619858375009821/node but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> [email protected] sassToJs /Users/jonathan/workspace/components-react
> node scripts/sass_to_js.js
The file was saved!
β¨ Done in 0.98s.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No license field.
added 2028 packages from 1233 contributors and audited 913016 packages in 98.304s
found 6 vulnerabilities (2 low, 4 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
I had to copy my .babelrc
file into the .storybook
directory which was recommended here: https://github.com/storybookjs/storybook/issues/6204#issuecomment-490991488
Also, if you're having trouble with Babel, we have to specify a corejs version now. Here is my setup if that helps:
.babelrc
{
"plugins": [
["@babel/plugin-transform-runtime", {
"corejs": 2
}]
],
"presets": [
["@babel/preset-env", {
"corejs": 2,
"useBuiltIns": "usage"
}],
"@babel/preset-react"
]
}
package.json
"dependencies": {
"@babel/runtime-corejs2": "^7.4.5",
"core-js": "^2.6.9",
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.4.4"
},
Looks like something is happening in the core-js project around that message that gets logged 20x
I'm using react-native storybook, and just upgraded from v4 to v5 with the following steps:
npx npm-check-updates '/storybook/' -u && npm install
npm add -D babel-loader react-native-server
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.
@storybook/vue
Only the downgrade to 5.0.11 helped me
I am having the same issue with the storybook and all the plugins. All problems are related with core-js. are there plans to update all the core-js dependencies to the new major version?
@JonathanSpeek can you post the contents of that polyfills.js file?
I think you're loading some core-js files manually, and those reference url's from core-js 2.
If you'd upgrade those to core-js 3 references, I think yours should work.
Have the same issue, after update to "@storybook/vue": "5.1.3", these errors:
ERROR in ./config/storybook/config.js
Module not found: Error: Can't resolve 'core-js/modules/es7.object.values' in '/site-vuejs-uikit/config/storybook'
@ ./config/storybook/config.js 2:0-43
@ multi ./node_modules/vue-cli-plugin-storybook/node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/vue-cli-plugin-storybook/node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js ./node_modules/webpack-hot-middleware/client.js?reload=true
And only after yarn add -D [email protected]
it's worked.
@demyan1411
core-js/modules/es7.object.values
should be core-js/modules/es.object.values
Can you share your setup so I can debug what's going on?
@ndelangen
Here's my polyfills.js file:
import 'core-js/modules/es7.array.includes';
import 'core-js/modules/es6.array.fill';
import 'core-js/modules/es6.string.includes';
import 'core-js/modules/es6.string.trim';
import 'core-js/modules/es7.object.values';
import 'core-js/modules/es6.array.find-index';
@JonathanSpeek if you can change that file, so it maps to the new core-js paths, it should work!
import 'core-js/modules/es7.array.includes';
import 'core-js/modules/es6.array.fill';
import 'core-js/modules/es6.string.includes';
import 'core-js/modules/es6.string.trim';
import 'core-js/modules/es7.object.values';
import 'core-js/modules/es6.array.find-index';
maps to
import 'core-js/modules/es.array.includes';
import 'core-js/modules/es.array.fill';
import 'core-js/modules/es.string.includes';
import 'core-js/modules/es.string.trim';
import 'core-js/modules/es.object.values';
import 'core-js/modules/es.array.find-index';
@ndelangen Thank you so much!
A combo of updating my pollyfill references and specifying the core-js
version (for me core-js@^3.1.1
), like what @cocco3 suggested - ended up working.
@ndelangen, I don't connect anywhere specifically core-js/modules/es7.object.values
I only update @storybook/vue and addons to 5.1.3
in my storybook/config.js I have:
import {configure, addDecorator} from '@storybook/vue';
import {withKnobs} from '@storybook/addon-knobs';
import Vue from 'vue';
import * as directives from '@/directives';
// Polyfill for svg sprite
import 'svgxuse';
// Polyfill for Element.closest
import 'element-closest-polyfill';
// Global styles for Project
import '../../src/common/index.css';
// Custom directives
Object
.values(directives)
.forEach(({name, directive}) => {
Vue.directive(name, directive);
});
// Addon withInfo not working globally
addDecorator(withKnobs);
// @see https://webpack.js.org/guides/dependency-management/#requirecontext
// we check full path to file
const req = require.context('../../src', true, /\/stories\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
@demyan1411 could you try a process of elimination to deduce what is importing the incorrect path for core-js?
you stacktrace just points to storybook/config
, so I have nothing to go on.
This issue has my highest priority. The issue is, The problem involves npm, lockfiles, package versions, webpack plugins. It's hard to replicate.
I really appreciate all comments here, I want to help resolve these issues for people.
If someone has a repo for me, that possibly they can share privately so i can understand what's going on, that would be super useful. π
@vlaraort we're on the latest 3.x.x version of core-js
@ndelangen,
I think it is important to mention, my project was generated using [email protected]
, and the Storybook was installed as a plugin "vue-cli-plugin-storybook": "0.6.1"
.
core-js@2
is a dependency of packets: vue/babel-preset-app
, [email protected]
, @[email protected]
, lazy-universal-dotenv@2
.
@[email protected]
is a dependency of - vue/babel-preset-app
.
lazy-universal-dotenv
is a dependency of - @storybook/[email protected]
.
I learned this with the command yarn list
.
Also command yarn why babel-runtime
get:
)
All my dependencies in package.json
"dependencies": {
"tiny-slider": "2.9.2",
"vue": "2.6.10"
},
"devDependencies": {
"@ascendancyy/vue-cli-plugin-stylelint": "1.1.2",
"@babel/plugin-proposal-export-default-from": "7.2.0",
"@mapbox/stylelint-processor-arbitrary-tags": "0.2.0",
"@storybook/addon-actions": "5.1.3",
"@storybook/addon-centered": "5.1.3",
"@storybook/addon-knobs": "5.1.3",
"@storybook/addon-links": "5.1.3",
"@storybook/addon-notes": "5.1.3",
"@storybook/addon-storysource": "5.1.3",
"@storybook/addon-viewport": "5.1.3",
"@storybook/vue": "5.1.3",
"@vue/cli-plugin-babel": "3.8.0",
"@vue/cli-plugin-eslint": "3.8.0",
"@vue/cli-plugin-unit-jest": "3.8.0",
"@vue/cli-service": "3.8.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.8.0",
"element-closest-polyfill": "1.0.0",
"eslint": "5.16.0",
"eslint-plugin-vue": "5.2.2",
"lint-staged": "8.2.0",
"postcss-css-variables": "0.12.0",
"postcss-custom-media": "7.0.8",
"postcss-import": "12.0.1",
"postcss-mixins": "6.2.1",
"postcss-nested": "4.1.2",
"postcss-prepend-imports": "1.0.1",
"pug": "2.0.3",
"pug-plain-loader": "1.0.0",
"storybook-addon-vue-info": "1.2.1",
"stylelint-config-standard": "18.3.0",
"svgo": "1.2.2",
"svgo-loader": "2.2.0",
"svgxuse": "1.2.6",
"vue-cli-plugin-storybook": "0.6.1",
"vue-cli-plugin-svg-sprite": "1.0.0",
"vue-template-compiler": "2.6.10"
},
@ndelangen, I found where this error comes from.
In my babel.config.js
I has:
module.exports = {
presets: [
'@vue/app',
],
};
And I use "@vue/cli-plugin-babel": "3.8.0"
.
In this plugin used core-js@2
Here is reproducible repo:- https://github.com/umakantp/demo-repro
Just 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.
Got storybook to run after installing core-js@^3.1.1. It gives me an error in chrome console now.
host-report-errors.js:6 Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise
(window|global).Promisehas been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
at Function.push../node_modules/zone.js/dist/zone.js.Zone.assertZonePatched (zone.js:58)
at new NgZone (core.js:17174)
at getNgZone (core.js:17861)
at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (core.js:17759)
at core.js:17803
at run (es.promise.js:103)
at es.promise.js:120
@umakantp I'm cloning your repo right now, thanks for posting!
@umakantp I just ran your repro repo successfully, using yarn as package manager.
@ndelangen Well I was using npm. Using yarn means not using my package-lock.json
I think you should try using npm once
Sorry I didn't report after. I did of course try npm and was able to reproduce.
The lockfile is the problem probably, but good news! My PR for a fix for storybook to deal with it, has been merged, and @shilman will do an (alpha?) release after he's off the plane and dealt with the jetlag.
Thanks a ton for helping me reproduce the issue @umakantp β€οΈ
Same issue here, tried lots of workarounds, none of them worked so far :(
$ npm -v
6.9.0
$ node -v
v10.15.3
Yup, can't wait this is released
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.
hmm still same:
$ npm run storybook:serve
```
ERROR in ./src/components/Button/Button.stories.js
Module not found: Error: Cannot find module 'core-js/modules/es7.symbol.async-iterator'
@ ./src/components/Button/Button.stories.js 1:0-51
@ ./src sync .stories.js$
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./config/storybook/config.js
Module not found: Error: Cannot find module 'core-js/modules/web.dom.iterable'
@ ./config/storybook/config.js 1:0-42
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./src/components/Button/Button.stories.js
Module not found: Error: Cannot find module 'core-js/modules/web.dom.iterable'
@ ./src/components/Button/Button.stories.js 3:0-42
@ ./src sync .stories.js$
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
```
Working on this
Huzzah!! 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.
Still got these errors in the console after upgrading to 5.1.5
. Rolling back to ~5.0.0
fixed it. Using pnpm
(with shamefully-flatten = true
) and Angular 8.0.1, so I suspect one of those things may be the cause, if this update fixed it for others. Or maybe it's a different issue altogether.
Β Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
at Function.push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.assertZonePatched (VM21 vendors~main.95bd387b9951393df8a7.bundle.js:125477)
at new NgZone (VM21 vendors~main.95bd387b9951393df8a7.bundle.js:59794)
at getNgZone (VM21 vendors~main.95bd387b9951393df8a7.bundle.js:60507)
at PlatformRef.push../node_modules/.registry.npmjs.org/@angular/core/[email protected][email protected]/node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (VM21 vendors~main.95bd387b9951393df8a7.bundle.js:60405)
at VM21 vendors~main.95bd387b9951393df8a7.bundle.js:60449
at run (VM21 vendors~main.95bd387b9951393df8a7.bundle.js:82756)
at VM21 vendors~main.95bd387b9951393df8a7.bundle.js:82773
Β | push../node_modules/.registry.npmjs.org/core-js/3.0.1/node_modules/core-js/internals/host-report-errors.js.module.exports | @ | VM21 vendors~main.95β¦8a7.bundle.js:80864
-- | -- | -- | --
Β | dispatchEvent | @ | VM21 vendors~main.95β¦8a7.bundle.js:82790
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:82802
Β | push../node_modules/.registry.npmjs.org/core-js/3.0.1/node_modules/core-js/internals/perform.js.module.exports | @ | VM21 vendors~main.95β¦8a7.bundle.js:81775
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:82799
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125842
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.runTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125614
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125917
Β | ZoneTask.invoke | @ | VM21 vendors~main.95β¦a7.bundle.js:125906
Β | timer | @ | VM21 vendors~main.95β¦a7.bundle.js:128489
Β | run | @ | VM21 vendors~main.95β¦a7.bundle.js:123067
Β | runIfPresent | @ | VM21 vendors~main.95β¦a7.bundle.js:123096
Β | onGlobalMessage | @ | VM21 vendors~main.95β¦a7.bundle.js:123136
Β | postMessage (async) | Β | Β
Β | registerImmediate | @ | VM21 vendors~main.95β¦a7.bundle.js:123147
Β | setImmediate | @ | VM21 vendors~main.95β¦a7.bundle.js:123054
Β | scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:128510
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125829
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125657
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125680
Β | scheduleMacroTaskWithCurrentZone | @ | VM21 vendors~main.95β¦a7.bundle.js:126613
Β | (anonymous) | @ | VM21 vendors~main.95β¦a7.bundle.js:128525
Β | proto.<computed> | @ | VM21 vendors~main.95β¦a7.bundle.js:126937
Β | onUnhandled | @ | VM21 vendors~main.95β¦8a7.bundle.js:82794
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:82776
Β | setTimeout (async) | Β | Β
Β | scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:128510
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125829
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.scheduleTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125657
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125680
Β | scheduleMacroTaskWithCurrentZone | @ | VM21 vendors~main.95β¦a7.bundle.js:126613
Β | (anonymous) | @ | VM21 vendors~main.95β¦a7.bundle.js:128525
Β | proto.<computed> | @ | VM21 vendors~main.95β¦a7.bundle.js:126937
Β | StoryStore._this.setSelection | @ | VM21 vendors~main.95β¦8a7.bundle.js:76582
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:77476
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:75616
Β | handleEvent | @ | VM21 vendors~main.95β¦8a7.bundle.js:75615
Β | (anonymous) | @ | VM21 vendors~main.95β¦8a7.bundle.js:75506
Β | handler | @ | VM21 vendors~main.95β¦8a7.bundle.js:75293
Β | handleEvent | @ | VM21 vendors~main.95β¦8a7.bundle.js:75384
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125842
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.Zone.runTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125614
Β | push../node_modules/.registry.npmjs.org/zone.js/0.9.1/node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask | @ | VM21 vendors~main.95β¦a7.bundle.js:125917
Β | invokeTask | @ | VM21 vendors~main.95β¦a7.bundle.js:127112
Β | globalZoneAwareCallback | @ | VM21 vendors~main.95β¦a7.bundle.js:127138
Β | postMessage (async) | Β | Β
Β | send | @ | vendors~main.9607ab0β¦26bb.bundle.js:8348
Β | handler | @ | vendors~main.9607ab0β¦26bb.bundle.js:8555
Β | emit | @ | vendors~main.9607ab0β¦26bb.bundle.js:8565
Β | emit | @ | vendors~main.9607ab0β¦26bb.bundle.js:6315
Β | componentDidUpdate | @ | vendors~main.9607ab0β¦6bb.bundle.js:17153
Β | commitLifeCycles | @ | vendors~main.9607ab0β¦6bb.bundle.js:51028
Β | commitAllLifeCycles | @ | vendors~main.9607ab0β¦6bb.bundle.js:52415
Β | callCallback | @ | vendors~main.9607ab0β¦6bb.bundle.js:33828
Β | invokeGuardedCallbackDev | @ | vendors~main.9607ab0β¦6bb.bundle.js:33878
Β | invokeGuardedCallback | @ | vendors~main.9607ab0β¦6bb.bundle.js:33935
Β | commitRoot | @ | vendors~main.9607ab0β¦6bb.bundle.js:52627
Β | (anonymous) | @ | vendors~main.9607ab0β¦6bb.bundle.js:54097
Β | unstable_runWithPriority | @ | vendors~main.9607ab0β¦6bb.bundle.js:66043
Β | completeRoot | @ | vendors~main.9607ab0β¦6bb.bundle.js:54096
Β | performWorkOnRoot | @ | vendors~main.9607ab0β¦6bb.bundle.js:54025
Β | performWork | @ | vendors~main.9607ab0β¦6bb.bundle.js:53933
Β | performSyncWork | @ | vendors~main.9607ab0β¦6bb.bundle.js:53907
Β | requestWork | @ | vendors~main.9607ab0β¦6bb.bundle.js:53776
Β | scheduleWork | @ | vendors~main.9607ab0β¦6bb.bundle.js:53590
Β | enqueueSetState | @ | vendors~main.9607ab0β¦6bb.bundle.js:44848
Β | push../node_modules/.registry.npmjs.org/react/16.8.6/node_modules/react/cjs/react.development.js.Component.setState | @ | vendors~main.9607ab0β¦6bb.bundle.js:63775
Β | (anonymous) | @ | vendors~main.9607ab0β¦26bb.bundle.js:2372
Β | requestAnimationFrame (async) | Β | Β
Β | (anonymous) | @ | vendors~main.9607ab0β¦26bb.bundle.js:2370
Β | Promise.then (async) | Β | Β
Β | (anonymous) | @ | vendors~main.9607ab0β¦26bb.bundle.js:2368
Β | (anonymous) | @ | vendors~main.9607ab0β¦26bb.bundle.js:2968
Β | navigate | @ | vendors~main.9607ab0β¦26bb.bundle.js:2967
Β | onClick | @ | vendors~main.9607ab0β¦26bb.bundle.js:2730
Β | callCallback | @ | vendors~main.9607ab0β¦6bb.bundle.js:33828
Β | invokeGuardedCallbackDev | @ | vendors~main.9607ab0β¦6bb.bundle.js:33878
Β | invokeGuardedCallback | @ | vendors~main.9607ab0β¦6bb.bundle.js:33935
Β | invokeGuardedCallbackAndCatchFirstError | @ | vendors~main.9607ab0β¦6bb.bundle.js:33949
Β | executeDispatch | @ | vendors~main.9607ab0β¦6bb.bundle.js:34240
Β | executeDispatchesInOrder | @ | vendors~main.9607ab0β¦6bb.bundle.js:34262
Β | executeDispatchesAndRelease | @ | vendors~main.9607ab0β¦6bb.bundle.js:34359
Β | executeDispatchesAndReleaseTopLevel | @ | vendors~main.9607ab0β¦6bb.bundle.js:34367
Β | forEachAccumulated | @ | vendors~main.9607ab0β¦6bb.bundle.js:34341
Β | runEventsInBatch | @ | vendors~main.9607ab0β¦6bb.bundle.js:34495
Β | runExtractedEventsInBatch | @ | vendors~main.9607ab0β¦6bb.bundle.js:34503
Β | handleTopLevel | @ | vendors~main.9607ab0β¦6bb.bundle.js:38505
Β | batchedUpdates$1 | @ | vendors~main.9607ab0β¦6bb.bundle.js:54118
Β | batchedUpdates | @ | vendors~main.9607ab0β¦6bb.bundle.js:35830
Β | dispatchEvent | @ | vendors~main.9607ab0β¦6bb.bundle.js:38584
Β | (anonymous) | @ | vendors~main.9607ab0β¦6bb.bundle.js:54169
Β | unstable_runWithPriority | @ | vendors~main.9607ab0β¦6bb.bundle.js:66043
Β | interactiveUpdates$1 | @ | vendors~main.9607ab0β¦6bb.bundle.js:54168
Β | interactiveUpdates | @ | vendors~main.9607ab0β¦6bb.bundle.js:35849
Β | dispatchInteractiveEvent | @ | vendors~main.9607ab0β¦6bb.bundle.js:38561
@shilman Hit by this as well (5.1.8), using useBuiltIns: false
.
@dperetti Not familiar with useBuiltIns
. For debugging purposes, is it easy to test whether useBuiltIns: true
fixes the problem?
@nategreen I do not know how flatten works, if you can debug what it does, and why it breaks the setup we'd welcome a PR!
@dperetti Why would you set useBuiltIns
to false?
Maybe that might work if you run storybook without dll (--no-dll
) though.
@ndelangen because I'm using Electron with a super recent Chromium that doesn't require any polyfill.
Cool, but storybook isn't running in Electron though, is it?
Our code assumes to be running in a browser, and we try to support browser down to IE11.
Could you post your error + stacktrace?
My Storybook is :-) https://github.com/storybookjs/storybook/issues/1435#issuecomment-441305372-permalink.
I will post more about my issue tonight. But Electron is a browser, by the way, and no polyfill it at all sounds like an easier case to support ;-)
Version 5.1.8 - fresh install as in my comment above:
Errors:
ERROR in ./src/components/SearchInput/SearchInput.vue?vue&type=script&lang=js& (./node_modules/storybook-addon-vue-info/loader!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchInput/SearchInput.vue?vue&type=script&lang=js&)
Module not found: Error: Cannot find module 'core-js/modules/es6.regexp.replace'
@ ./src/components/SearchInput/SearchInput.vue?vue&type=script&lang=js& (./node_modules/storybook-addon-vue-info/loader!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchInput/SearchInput.vue?vue&type=script&lang=js&) 4:0-44
@ ./src/components/SearchInput/SearchInput.vue?vue&type=script&lang=js&
@ ./src/components/SearchInput/SearchInput.vue
@ ./src/components/SearchInput/SearchInput.stories.js
@ ./src sync .stories.js$
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./src/components/widgets/MainMenu/MainMenu.vue?vue&type=script&lang=js& (./node_modules/storybook-addon-vue-info/loader!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/MainMenu/MainMenu.vue?vue&type=script&lang=js&)
Module not found: Error: Cannot find module 'core-js/modules/es6.regexp.split'
@ ./src/components/widgets/MainMenu/MainMenu.vue?vue&type=script&lang=js& (./node_modules/storybook-addon-vue-info/loader!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/widgets/MainMenu/MainMenu.vue?vue&type=script&lang=js&) 1:0-42
@ ./src/components/widgets/MainMenu/MainMenu.vue?vue&type=script&lang=js&
@ ./src/components/widgets/MainMenu/MainMenu.vue
@ ./src/components/widgets/MainMenu/MainMenu.stories.js
@ ./src sync .stories.js$
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./config/storybook/config.js
Module not found: Error: Cannot find module 'core-js/modules/web.dom.iterable'
@ ./config/storybook/config.js 1:0-42
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
ERROR in ./src/components/Button/Button.stories.js
Module not found: Error: Cannot find module 'core-js/modules/web.dom.iterable'
@ ./src/components/Button/Button.stories.js 3:0-42
@ ./src sync .stories.js$
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
package.json
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.17",
"@fortawesome/free-brands-svg-icons": "^5.8.1",
"@fortawesome/free-solid-svg-icons": "^5.8.1",
"@fortawesome/vue-fontawesome": "^0.1.6",
"bootstrap": "^4.3.1",
"exports-loader": "^0.7.0",
"mdbvue": "^5.2.0",
"vue": "^2.6.10",
"vue-multiselect": "^2.1.6",
"vue2-animate": "^2.1.0"
},
"devDependencies": {
"@ascendancyy/vue-cli-plugin-stylelint": "^1.1.2",
"@storybook/addon-a11y": "^5.1.8",
"@storybook/addon-actions": "^5.1.8",
"@storybook/addon-backgrounds": "^5.1.8",
"@storybook/addon-contexts": "^5.1.8",
"@storybook/addon-cssresources": "^5.1.8",
"@storybook/addon-info": "^5.1.8",
"@storybook/addon-jest": "^5.1.8",
"@storybook/addon-knobs": "^5.1.8",
"@storybook/addon-links": "^5.1.8",
"@storybook/addon-notes": "^5.1.8",
"@storybook/addon-storyshots": "^5.1.8",
"@storybook/addon-viewport": "^5.1.8",
"@storybook/core": "^5.1.8",
"@storybook/theming": "^5.1.8",
"@storybook/vue": "^5.1.8",
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-plugin-unit-jest": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/test-utils": "1.0.0-beta.29",
"assets-webpack-plugin": "^3.9.10",
"babel-core": "6.26.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"eslint": "^5.8.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-vue": "^5.0.0",
"lint-staged": "^8.1.4",
"node-sass": "^4.9.0",
"sass-loader": "^7.1.0",
"storybook-addon-vue-info": "^1.2.1",
"stylelint": "^10.0.1",
"stylelint-a11y": "^1.1.11",
"stylelint-config-sass-guidelines": "^6.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.1.0",
"stylelint-declaration-strict-value": "^1.1.2",
"stylelint-no-unsupported-browser-features": "^3.0.2",
"stylelint-selector-bem-pattern": "^2.1.0",
"vue-cli-plugin-storybook": "^0.6.1",
"vue-docgen-api": "^3.13.8",
"vue-template-compiler": "^2.5.21"
I worked around now by copying ALL the contents from [email protected] modules
folder into my core-js3 modules
folder... e.g.:
cp -rf node_modules/core-js2/modules/* ~/Projects/MyImportantProject/node_modules/core-js3/modules
A fix which works for us now (also on CI):
Upgrade vue cli:
"@vue/cli-plugin-babel": "^4.0.0-alpha.1",
"@vue/cli-plugin-eslint": "^4.0.0-alpha.1",
"@vue/cli-plugin-unit-jest": "^4.0.0-alpha.1",
"@vue/cli-service": "^4.0.0-alpha.1",
See release notes:
Awesome! Vue upgraded as well π
@dperetti please do. Right an evergreen only project is easier then a non-evergreen project.
But a project where you want both an evergreen distributable AND a non-evergreen distributable is more complex than either one alone.
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/node": "^7.2.2",
"@babel/preset-env": "^7.3.4",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@jest-runner/electron": "^1.1.1",
"@storybook/addon-actions": "5.1.8",
"@storybook/addon-centered": "5.1.8",
"@storybook/addon-knobs": "5.1.8",
"@storybook/addon-options": "5.1.8",
"@storybook/addon-storysource": "5.1.8",
"@storybook/react": "5.1.8",
"apollo-codegen": "^0.19.1",
"archiver": "0.21.0",
"asar": "^0.13.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^24.3.1",
"babel-loader": "^8.0.0",
"babel-plugin-add-module-exports": "^1.0.0",
"chai": "^4.1.2",
"circular-dependency-plugin": "^5.0.1",
"coffee": "1.0.0",
"coffee-script": "1.9.2",
"css-loader": "^0.28.11",
"electron": "^5.0.4",
"electron-builder": "15.6.4",
"electron-osx-sign": "^0.4.3",
"electron-packager": "^13.1.1",
"electron-rebuild": "^1.8.5",
"express": "^4.14.0",
"fake-indexeddb": "^2.0.4",
"file-loader": "^1.1.11",
"flow": "^0.2.3",
"flow-bin": "0.99.1",
"flow-interfaces": "^0.6.1",
"flowgen": "^1.2.3",
"font-awesome-webpack": "git://github.com/jarecsni/font-awesome-webpack",
"fs-extra": "0.26.4",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.3.1",
"jest-extended": "^0.11.1",
"js-yaml": "3.5.2",
"jscodeshift": "^0.3.32",
"json-loader": "^0.5.7",
"less": "2.5.3",
"less-loader": "^4.1.0",
"licensecheck": "^1.3.0",
"mock-fs": "^4.7.0",
"node-abi": "2.8.0",
"node-libs-browser": "0.5.2",
"open": "0.0.5",
"plist": "1.2.0",
"react-hot-loader": "^4.11.0",
"react-test-renderer": "^16.5.2",
"regenerator-runtime": "^0.12.1",
"regexp-replace-loader": "^1.0.1",
"standard": "^8.6.0",
"style-loader": "^0.20.3",
"transfer-webpack-plugin": "0.1.4",
"uglifyjs-webpack-plugin": "^1.2.4",
"url-loader": "^1.0.1",
"watchify": "^3.9.0",
"webpack": "^4.29.6",
"webpack-build-notifier": "^0.1.29",
"webpack-cli": "^3.1.1",
"webpack-dev-middleware": "^3.7.0",
"webpack-hot-middleware": "^2.24.4",
"yaml-include-loader": "^1.0.0",
"yaml-loader": "^0.5.0"
},
"optionalDependencies": {
"fsevents": "^2.0.7"
},
"dependencies": {
"@fortawesome/fontawesome": "^1.1.8",
"@fortawesome/fontawesome-free": "^5.8.2",
"@fortawesome/fontawesome-free-regular": "^5.1.0-3",
"@fortawesome/fontawesome-free-solid": "^5.1.0-3",
"@fortawesome/fontawesome-svg-core": "^1.2.18",
"@fortawesome/free-solid-svg-icons": "^5.3.1",
"@fortawesome/react-fontawesome": "^0.1.3",
"antd": "^3.19.2",
"aphrodite": "^1.2.0",
"apollo-cache-inmemory": "^1.3.5",
"apollo-cache-persist": "^0.1.1",
"apollo-client": "^2.4.5",
"apollo-link": "^1.2.3",
"apollo-link-error": "^1.1.1",
"apollo-link-http": "^1.5.5",
"apollo-upload-client": "^9.1.0",
"bootstrap": "3.3.7",
"chokidar": "^3.0.1",
"chroma-js": "^2.0.2",
"classnames": "2.1.3",
"codemirror": "git://github.com/dperetti/CodeMirror",
"commander": "^2.15.1",
"css-animation": "^1.4.1",
"deep-equal": "^1.0.1",
"dexie": "^2.0.4",
"draft-js": "^0.10.5",
"draft-js-export-html": "^1.2.0",
"draft-js-import-html": "^1.2.1",
"electron-log": "^3.0.1",
"electron-store": "^2.0.0",
"emotion": "^10.0.6",
"escape-string-applescript": "1.0.0",
"faker": "^4.1.0",
"findandreplacedomtext": "0.4.4",
"flow-immutable-models": "^0.12.0",
"flux": "^3.1.3",
"font-awesome": "4.4.0",
"getmac": "1.0.7",
"graceful-fs": "^4.1.11",
"graphql": "14.1.1",
"graphql-tag": "^2.10.1",
"immer": "^2.1.4",
"immutable": "4.0.0-rc.12",
"immutable-json": "git://github.com/dperetti/immutable-json",
"jquery": "2.1.4",
"jquery-ui": "1.10.5",
"jsonwebtoken": "^8.3.0",
"keymirror": "0.1.1",
"keymirror-flow": "^1.0.0",
"lowdb": "^1.0.0",
"luxon": "^1.12.1",
"medium-editor": "5.7.0",
"minimatch": "3.0.0",
"minimist": "^1.2.0",
"node-dir": "dperetti/node-dir",
"node-uuid": "1.4.3",
"odiff": "^1.2.0",
"promise-queue": "^2.2.5",
"prop-types": "^15.6.1",
"randomstring": "1.1.0",
"rangy": "1.3.0",
"raw-loader": "^1.0.0",
"rc-animate": "^2.4.1",
"re-resizable": "^4.4.4",
"react": "^16.6.3",
"react-apollo": "^2.2.4",
"react-beautiful-dnd": "^6.0.2",
"react-bootstrap": "^0.32.1",
"react-dom": "^16.6.3",
"react-gravatar": "^2.6.3",
"react-inline": "^0.8.2",
"react-navigation-controller": "^3.1.1",
"react-rnd": "^7.3.0",
"react-select": "2.4.4",
"react-sortable-hoc": "^0.6.5",
"react-split-pane": "^0.1.85",
"react-transition-group": "^2.2.1",
"react-virtualized": "^9.21.0",
"shelljs": "^0.8.1",
"simple-git": "^1.113.0",
"string": "3.1.1",
"striptags": "^3.1.1",
"upath": "1.1.0",
"uuid": "^3.3.2",
"vinyl-fs": "^2.4.4",
"watch": "1.0.1",
"wrench": "1.5.8"
}
and thousands of lines like this
```
...
ERROR in ./node_modules/@storybook/channels/dist/index.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/addon-actions/dist/preview/withActions.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/theming/dist/modules/syntax.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/client-api/dist/story_store.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/client-api/dist/client_api.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/client-api/dist/subscriptions_store.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/router/dist/utils.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/components/dist/placeholder/placeholder.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/react/dist/client/preview/element_check.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/channel-postmessage/dist/index.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.dom-collections.iterator.js'
Require stack:
ERROR in ./node_modules/@storybook/channels/dist/index.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.immediate.js'
Require stack:
ERROR in ./node_modules/@storybook/components/dist/syntaxhighlighter/syntaxhighlighter.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.timers.js'
Require stack:
ERROR in ./node_modules/@storybook/addon-knobs/dist/KnobManager.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.timers.js'
Require stack:
ERROR in ./node_modules/@storybook/addon-knobs/dist/KnobStore.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.timers.js'
Require stack:
ERROR in ./node_modules/@storybook/client-api/dist/story_store.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.timers.js'
Require stack:
ERROR in ./node_modules/@storybook/client-api/dist/config_api.js
Module not found: Error: Cannot find module '/Users/dom/Dropbox/dev/codestory/node_modules/babel-loader/lib/index.js??ref--4!/Users/dom/Dropbox/dev/codestory/node_modules/core-js/modules/web.timers.js'
Require stack:
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.
here too on latest
Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
but everything is working fine in 5.0.0
Β―\_(γ)_/Β―
export ADBLOCK=1 && npm i
Still experiencing same problem at 5.2.1
Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
+1
tnx @dimlksin2, your solution works
i had the same webpack error on storybook 5.3.*
and 6.0.*
this was due to duplicated addons
in the .storybook\main.js
file
Most helpful comment
Following.