-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
wait until bundle finished, stopped at 99% [webpack 5] #14405
Comments
Do you have a repro repo you can share? |
sorry it's private and I'm not admin |
I think I'm experiencing a similar issue: info @storybook/react v6.2.1
info
info => Loading presets
info => Loading 1 config file in "/Users/daviddelusenet/Development/react-components/storybook"
info => Loading 8 other files in "/Users/daviddelusenet/Development/react-components/storybook"
info => Adding stories defined in "/Users/daviddelusenet/Development/react-components/storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack5 setup
<i> [webpack-dev-middleware] wait until bundle finished
10% building 0/1 entries 0/0 dependencies 0/0 modulesinfo => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview a16e82c975a3573b1c34 in 9471ms
╭──────────────────────────────────────────────────────╮
│ │
│ Storybook 6.2.1 started │
│ 10 s for preview │
│ │
│ Local: http://localhost:9001/ │
│ On your network: http://192.168.178.143:9001/ │
│ │
╰──────────────────────────────────────────────────────╯
99% done plugins webpack-hot-middlewarewebpack built preview 4ded963b174d5c7e2f53 in 967ms When I go to http://localhost:9001/ I just get Contents of module.exports = {
stories: ['../src/**/*.stories.@(jsx|tsx|mdx)'],
core: {
builder: 'webpack5',
},
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
'@storybook/addon-docs',
'@storybook/addon-viewport',
'@storybook/addon-a11y',
'@storybook/addon-links',
'@storybook/addon-storysource',
],
} Output of System:
OS: macOS 11.2.3
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Binaries:
Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.9 - ~/Development/react-components/node_modules/.bin/npm
Browsers:
Chrome: 89.0.4389.90
Firefox: 85.0.2
Safari: 14.0.3
npmPackages:
@storybook/addon-a11y: ^6.2.1 => 6.2.1
@storybook/addon-actions: ^6.2.1 => 6.2.1
@storybook/addon-docs: ^6.2.1 => 6.2.1
@storybook/addon-knobs: ^6.2.1 => 6.2.1
@storybook/addon-links: ^6.2.1 => 6.2.1
@storybook/addon-storyshots: ^6.2.1 => 6.2.1
@storybook/addon-storysource: ^6.2.1 => 6.2.1
@storybook/addon-viewport: ^6.2.1 => 6.2.1
@storybook/builder-webpack5: ^6.2.1 => 6.2.1
@storybook/core: ^6.2.1 => 6.2.1
@storybook/react: ^6.2.1 => 6.2.1
@storybook/source-loader: ^6.2.1 => 6.2.1 Please let me know if you need any more information. |
Facing the above issue as well. |
I'm having this issue as well. For some reason it's also printing out a bunch of JS. It's happening after upgrading to v6.2.9 to try and get Webpack 5 working.
Storybook CLI Output> start-storybook -p 6006 -s ./static,"./static/images:/static/images"
info @storybook/react v6.2.9
info
babelConfig {
presets: [ [ 'next/babel', [Object] ], '@emotion/babel-preset-css-prop' ],
plugins: [ 'lodash' ],
env: { development: { plugins: [Array] } }
}
info => Loading presets
info => Serving static files from ././static at /
info => Serving static files from ././static/images at /static/images
info => Loading 1 config file in ".storybook"
info => Loading custom manager config
WARN unable to find package.json for @chakra-ui/icons
WARN unable to find package.json for @chakra-ui/react
WARN unable to find package.json for @chakra-ui/theme-tools
info => Loading custom manager config
info => Adding stories defined in ".storybook/main.js"
info => Using implicit CSS loaders
info => Using default Webpack5 setup
preview Write virtual module: .storybook/storybook-init-framework-entry.js import '@storybook/react';
preview Write virtual module: .storybook/preview.js-generated-config-entry.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint-disable import/no-unresolved */
import { addDecorator, addParameters, addLoader, addArgTypesEnhancer } from '@storybook/client-api';
import { logger } from '@storybook/client-logger';
import * as config from '.storybook/preview.js';
Object.keys(config).forEach(function (key) {
var value = config[key];
switch (key) {
case 'args':
case 'argTypes':
{
return logger.warn('Invalid args/argTypes in config, ignoring.', JSON.stringify(value));
}
case 'decorators':
{
return value.forEach(function (decorator) {
return addDecorator(decorator, false);
});
}
case 'loaders':
{
return value.forEach(function (loader) {
return addLoader(loader, false);
});
}
case 'parameters':
{
return addParameters(_objectSpread({}, value), false);
}
case 'argTypesEnhancers':
{
return value.forEach(function (enhancer) {
return addArgTypesEnhancer(enhancer);
});
}
case 'globals':
case 'globalTypes':
{
var v = {};
v[key] = value;
return addParameters(v, false);
}
default:
{
// eslint-disable-next-line prefer-template
return console.log(key + ' was not supported :( !');
}
}
});
preview Write virtual module: .storybook/generated-stories-entry.js "use strict";
var _frameworkImportPath = require("@storybook/react");
/* eslint-disable import/no-unresolved */
(0, _frameworkImportPath.configure)([require.context('../assets/js', true, /^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)ActionBar\.stories\.(js|jsx|tsx|mdx))$/)], module, false);
<i> [webpack-dev-middleware] wait until bundle finished
10% building 0/1 entries 0/0 dependencies 0/0 modulesinfo => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview 8536a88555f8a62e60d6 in 7803ms
╭────────────────────────────────────────────────────╮
│ │
│ Storybook 6.2.9 started │
│ 8.45 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://192.168.86.30:6006/ │
│ │
╰────────────────────────────────────────────────────╯
<i> [webpack-dev-middleware] wait until bundle finished: /
99% done plugins webpack-hot-middlewarewebpack built preview 077f393731c4855157e5 in 1180ms Storybook Config/* eslint-disable @typescript-eslint/no-var-requires,no-param-reassign */
const path = require('path')
const _ = require('lodash')
const babelConfig = require('../.babelrc')
console.log('babelConfig', babelConfig)
const toPath = _path => path.join(process.cwd(), _path)
const isDev = process.env.NODE_ENV === 'development'
module.exports = {
core: {
builder: 'webpack5'
},
// reactOptions: {
// fastRefresh: true
// },
stories: [`../assets/js/**/ActionBar.stories.@(js|jsx|tsx|mdx)`],
typescript: { reactDocgen: isDev ? 'react-docgen' : 'react-docgen-typescript-plugin' },
// addons: [
// '@storybook/addon-docs',
// '@storybook/addon-knobs/register',
// '@storybook/addon-actions',
// '@storybook/addon-links',
// '@storybook/addon-storysource'
// ],
async babel(options) {
return babelConfig
},
webpackFinal: async config => {
// add path aliases
config.resolve.alias = {
...config.resolve.alias,
'~': path.resolve(__dirname, '../assets/js')
// '@emotion/core': toPath('node_modules/@emotion/react'),
// '@emotion/styled': toPath('node_modules/@emotion/styled'),
// '@emotion/babel-preset-babel': toPath('node_modules/@emotion/babel-preset-babel'),
// 'emotion-theming': toPath('node_modules/@emotion/react')
}
// config.resolve.fallback = { fs: false, net: false, tty: false, stream: false, path: false, crypto: false }
// config.module.rules.push(
// // See: https://github.com/webpack/webpack/issues/11467
// { test: /\.m?js/, resolve: { fullySpecified: false } }
// )
// config.module.rules.push({
// test: /\.s?css$/,
// use: ['style-loader', 'css-loader', 'sass-loader'],
// include: [path.resolve(__dirname, '../assets/js')]
// })
return config
},
managerWebpack: async config => {
// add path aliases
config.resolve.alias = {
...config.resolve.alias,
'~': path.resolve(__dirname, '../assets/js')
}
return config
}
} |
My issue is similar to @andy-57blocks running everything at v6.2.9. I get the infamous: [webpack-dev-middleware] wait until bundle finished: /
99% done plugins webpack-hot-middlewarewebpack built preview 768e0d44337dbfbd139d in 1081ms Then a blank storybook page loads with some errors in the FWIW, I do also get a ton of warnings about: Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
["@babel/plugin-proposal-private-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config. |
I'm also getting those warnings about |
I have the same problem as @itzjonas (#14405 (comment)) and @kucheruk (#14405 (comment)) - 99% and |
I also got a TON of |
I have the same issue but cannot provide a public demo repo as I don't own the code. Would a private repo do, perhaps? |
I was having the same issue myself. I noticed that the manager is cached when running |
That's odd because I |
Agree with @timkindberg but @smurrayatwork's seems to work fine for me. Ensure your node modules are not too old (I upgraded |
Sorry, I should have listed the dependencies I'm using that got this working!
|
After upgrading to 6.4.0-alpha.12 and webpack 5 I'm facing this issue with 99% and loader on the web page. In the console on the web page I have this error:
I've updated all my dependencies to latest version and also tried to clear and install node_modules several times. |
@martinsuba do you have a reproduction repo or can you create one by running |
Running into the same issue using Yarn 3. @liby reproduction captures roughly the same setup. |
@shilman |
What's interesting in our case (relevant PR here) is that the React Storybook starts up fine, it's the web components one that does not and I suspect it might be because of its direct dependency to |
I was getting stuck at 58%. In my case
Oddly enough, it only failed on my local dev machine - CI always worked perfectly. |
I hope the following solution will provide some insights if you're using customized ejected cra.
@shilman There're too many hidden details. I hope this can be documented somewhere since people do customize cra by ejecting. Here's the snippet that's working for me: const custom = require("../config/webpack.config")("development");
const { processCraConfig } = require("./helpers/processCraConfig.js");
const { mergePlugins } = require("./helpers/mergePlugins.js");
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)",
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-webpack5",
},
webpackFinal: async (config, options) => {
config.module = {
...config.module,
// rules: [...config.module.rules],
rules: [
// Your webpack config won't process .md or .mdx since no such loader
// So let these files go to storybook webpack config, and all other files go to your cra webpack config
...config.module.rules.filter(
({ test }) =>
test instanceof RegExp &&
test &&
(test.test(".md") ||
test.test(".mdx") ||
test.test(".stories.md") ||
test.test(".stories.mdx"))
),
...processCraConfig(custom, options),
],
};
console.log("config", config.module.rules);
// Merge cra webpack plugins with storybook webpack plugins
config.plugins = mergePlugins(...config.plugins, ...custom.plugins);
return config;
},
}; |
Humm interestingly, I did not have this error until I upgraded to 6.5.9, from 6.4. I am just confirming this is the case though. |
I faced a similar issue and it turned out that it was caused by #16827 and had nothing to do with "99%". The last log I got from storybook build was:
And the Storybook page was freezing. But, it turns out that at least in my case, it had nothing to do with the "99%". Webpack build was completed, it just so happens that webpack progress never reports 100%, so the 99% stays in the console. After some debug I found that
I hope it helps. |
Unfortunately didn't fix it for me. Neither did |
Same here, it happens when using CRA. yarn create react-app try-storybook
...
cd try-storybook
...
npx storybook init
...
yarn storybook
...
╭──────────────────────────────────────────────────╮
│ │
│ Storybook 6.5.10 for React started │
│ 7.93 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://192.168.1.6:6006/ │
│ │
╰──────────────────────────────────────────────────╯
<i> [webpack-dev-middleware] wait until bundle finished: /runtime_main.2a33b5bbf035974def14.hot-update.json
<i> [webpack-dev-middleware] wait until bundle finished: /?path=/story/components-image--image
99% done plugins webpack-hot-middlewarewebpack built preview 2a33b5bbf035974def14 in 397ms |
I had an attempt to update the Storybook and use webpack5 and faced the same issue. The issue is easily reproducible with storybook 6.5.10. I have created a repository to reproduce by running
|
I was facing the space issue and now resolved. I saw my recent commit history and found some of the packages were automatically downgraded to previous version. So I have revert the commit, and it's working. Below is old commit, which was creating issue:
Below is latest commit, and which resolved the issue:
|
Same here
|
@shilman Any progress on it? Problem still reprodusing for me with webpack 5 and module federation
|
AFAICT this isn't an error. For example, in the second to last comment:
It prints out 99% done, and then prints out "built preview", which means that it's 100% complete. We should provide better debugging tools for Webpack users, but the "99% complete" is a red herring. Closing this. |
Hello @shilman thanks for your reply and your time. |
@denkrasnov Your repro works fine for me. What is the output of |
|
@denkrasnov here's mine. looks pretty damn close...
|
The above are very close to my versions as well. I had the same issue as original poster. I upgraded my yarn packages, removed the storybook cache, removed the whole node modules folder, tweaked libraries, tried lots of things but couldn't get it to load past 99% and none of my components showed in the UI though the rest of the app loaded successfully. There were also no errors in terminal, code, or app console. Finally, I started a new branch, re-installed storybook from the beginning with So - I got past this issue, best advice I can give for a solution is take note of the addons you want, and try a fresh install. |
I found that my storybook was hanging because of |
Same issue for me
|
I experienced this issue after renaming some of my files. For me the solution was to delete the storybook-static files as I suspect Storybook was caching the old file names. I also deleted node_modules for good measure, but it's likely not needed in my case as I didn't modify my package.json. Doing the following steps resolved the issue for me (replace 'pnpm' with your package manager of choice):
|
I still have the same issue ("storybook": "7.0.0-beta.53") |
For those who have the issue. If you have the What happened in my case we bloated the When I replaced this: webpackFinal: async (config, { configType }) => {
return {
...
resolve: devConfig.resolve,
...
};
}, With this: resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
...devConfig.resolve.alias,
},
}, This helped. This can happen with other custom configuration fields, so just make sure you are not "overriding" important parts of the configuration. |
I am having this issue with v7.0.12 |
Thank you! this fixed my issue |
Thank you @Lighttree - you got it fixed for me! |
FYI: Kernel Problems This happened when after the update Kernel 6.5.9-200.fc38.x86_64 kernel problem occurred, but your kernel has been tainted (flags:GW). Explanation: |
when I run start, the progress bar is stuck at 99%. and then my local web page opened but just keep loading.
I use npm to install packages.
OS: window 10
node: V10.22.0
npm : V6.14.6
storybook config:
devDependencies
Screenshots
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: