NPM安装后故事书失败/ Babel或Gatsby出现问题?

时间:2018-10-03 20:18:53

标签: npm jestjs babel gatsby storybook

我一直在成功运行Storybook,但是最近npm安装了jest,这导致我的整个package.json更新并导致storybook损坏。不知道从哪里开始(发行babel还是gatsby?),但是当我尝试运行Storybook时,这是我终端的错误:

  

> 
>     ERROR in ./node_modules/gatsby/cache-dir/navigation.js
>     Module not found: Error: Can't resolve './redirects.json' in '/Users/zmason/Documents/code/resourcehub-components/node_modules/gatsby/cache-dir'
>      @ ./node_modules/gatsby/cache-dir/navigation.js 12:17-44
>      @ ./node_modules/gatsby/cache-dir/page-renderer.js
>      @ ./node_modules/gatsby/cache-dir/public-page-renderer-prod.js
>      @ ./node_modules/gatsby/cache-dir/public-page-renderer.js
>      @ ./node_modules/gatsby/cache-dir/gatsby-browser-entry.js
>      @ ./src/components/Card/LinkCard.js
>      @ ./stories/index.stories.js
>      @ ./.storybook/config.js
>      @ multi ./node_modules/@storybook/react/dist/server/config/polyfills.js
> ./node_modules/@storybook/react/dist/server/config/globals.js
> (webpack)-hot-middleware/client.js?reload=true ./.storybook/config.js
>     Child html-webpack-plugin for "iframe.html":
>               Asset    Size  Chunks  Chunk Names
>         iframe.html  569 kB       0
>            [0] ./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/react/dist/server/iframe.html.ejs
> 1.16 kB {0} [built]
>            [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
>            [2] (webpack)/buildin/global.js 509 bytes {0} [built]
>            [3] (webpack)/buildin/module.js 517 bytes {0} [built]
>     Child html-webpack-plugin for "index.html":
>              Asset    Size  Chunks  Chunk Names
>         index.html  569 kB       0
>            [0] ./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/react/dist/server/index.html.ejs
> 1.7 kB {0} [built]
>            [1] ./node_modules/lodash/lodash.js 540 kB {0} [built]
>            [2] (webpack)/buildin/global.js 509 bytes {0} [built]
>            [3] (webpack)/buildin/module.js 517 bytes {0} [built]
> 
> 

任何帮助都是巨大的!

0 个答案:

没有答案