vue-cli-plugin-storybook: Unable to successfully run local storybook on new CLI Project
On a fresh project created using vue cli@3.0.1, I am able to add the plugin with no warnings or errors, but when immediately running the serve:storybook script, I receive the following warning, which prevents all stories from rendering:
WARNING in ./src/stories/index.stories.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: programPath.hub.addHelper is not a function
at wrapInterop (/Users/tone/Documents/JS/_snbx/st/node_modules/@storybook/core/node_modules/@babel/helper-module-transforms/lib/index.js:165:45)
at PluginPass.exit (/Users/tone/Documents/JS/_snbx/st/node_modules/@storybook/core/node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js:174:70)
at newFn (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/visitors.js:237:21)
at NodePath._call (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/path/context.js:65:20)
at NodePath.call (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/path/context.js:109:8)
at TraversalContext.visitQueue (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/context.js:142:16)
at TraversalContext.visitSingle (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/context.js:102:19)
at TraversalContext.visit (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/context.js:182:19)
at Function.traverse.node (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/index.js:106:17)
at traverse (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/traverse/lib/index.js:76:12)
at transformFile (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/core/lib/transformation/index.js:116:29)
at runSync (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/core/lib/transformation/index.js:45:3)
at runAsync (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/core/lib/transformation/index.js:35:14)
at process.nextTick (/Users/tone/Documents/JS/_snbx/st/node_modules/@babel/core/lib/transform.js:34:34)
at process._tickCallback (internal/process/next_tick.js:61:11)
@ ./src/stories sync .stories.js$ ./index.stories.js
@ ./config/storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/config/polyfills.js ./node_modules/@storybook/core/dist/server/config/globals.js ./config/storybook/config.js (webpack)-hot-middleware/client.js?reload=true
I’ve tried this with both the default preset provided by vue-cli and a manually entered configuration, and I consistently receive the same result. As pointed out by this comment, I believe the issue to be babel related.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 16 (5 by maintainers)
Fixed adding an empty
.babelrcfile inside.storybookfolderTo not edit manually the
yarn.lockfile, I fixed the version in thepackage.jsonfile DocumentationHere are my
package.jsondependencies, I hope this can be helpful for those who also decided to downgrade for now:@gabemule please let me know if it can be any help
I dont think so 😄 . You should try to downgrade @storybook dependencies to alpha.20 in your package-lock.json or yarn.lock.
@pksunkara Sorry to return to this, but latest still 0.4.7 in npm versions.
https://www.npmjs.com/package/vue-cli-plugin-storybook