Closed
Description
I get Unknown option: base.cacheDirectory
when trying to run StoryShots through Jest on vanilla project from create-react-app with only StoryBook added.
StoryBook works ok with create-react-app.
There was also an error regarding react-test-renderer
because installing StoryShots doesn't install it, but that can be fixed with npm install.
PASS src\App.test.js
FAIL src\storyshots.test.js
● Test suite failed to run
ReferenceError: [BABEL] C:\test\.storybook\config.js: Unknown option: base.cacheDirectory. Check out http://b
abeljs.io/docs/usage/options/ for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset
name. Example:
Invalid:
`{ presets: [{option: value}] }`
Valid:
`{ presets: [['presetName', {option: value}]] }`
For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets
-options.
at Logger.error (node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:226:
20)
at OptionManager.init (node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at Object.transformFileSync (node_modules/babel-core/lib/api/node.js:152:10)
at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/index.js:88:25)
at Object.<anonymous> (src/storyshots.test.js:3:31)
at <anonymous>
Test Suites: 1 failed, 1 passed, 2 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 3.074s
Ran all test suites related to changed files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment