首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >故事书的迁移

故事书的迁移
EN

Stack Overflow用户
提问于 2019-09-18 17:02:17
回答 1查看 482关注 0票数 3

我想将Storybook从5.0.11迁移到5.2.0,但在package.json中更改版本后,我得到了:

代码语言:javascript
复制
ERROR in ./node_modules/@storybook/theming/dist/utils.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.concat' in '/home/twaszczyk/workspaces/ui-elements/node_modules/@storybook/theming/dist'
 @ ./node_modules/@storybook/theming/dist/utils.js 9:0-42
 @ ./node_modules/@storybook/theming/dist/index.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 ./node_modules/@storybook/theming/node_modules/@storybook/client-logger/dist/index.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.concat' in '/home/twaszczyk/workspaces/ui-elements/node_modules/@storybook/theming/node_modules/@storybook/client-logger/dist'
 @ ./node_modules/@storybook/theming/node_modules/@storybook/client-logger/dist/index.js 3:0-42
 @ ./node_modules/@storybook/theming/dist/ensure.js
 @ ./node_modules/@storybook/theming/dist/index.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 ./node_modules/@storybook/theming/dist/index.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.for-each' in '/home/twaszczyk/workspaces/ui-elements/node_modules/@storybook/theming/dist'
 @ ./node_modules/@storybook/theming/dist/index.js 3:0-44
 @ ./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 ./node_modules/@storybook/theming/dist/convert.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.index-of' in '/home/twaszczyk/workspaces/ui-elements/node_modules/@storybook/theming/dist'
 @ ./node_modules/@storybook/theming/dist/convert.js 5:0-44
 @ ./node_modules/@storybook/theming/dist/index.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

我也在寻找迁移指南,但没有找到我应该做什么来完成它。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-21 18:58:23

下面是解决方案(希望这能有所帮助):

代码语言:javascript
复制
{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "declarationMap": false
  }
}

package.json中的迁移依赖项

代码语言:javascript
复制
"@storybook/addon-actions": "^5.2.0",
"@storybook/addon-centered": "^5.2.0",
"@storybook/addon-info": "^5.2.0",
"@storybook/addon-knobs": "^5.2.0",
"@storybook/addon-storysource": "^5.2.0",
"@storybook/addon-viewport": "^5.2.0",
"@storybook/components": "^5.2.0",
"@storybook/react": "^5.2.0",
"@storybook/source-loader": "^5.2.0",
"@storybook/theming": "^5.2.0",

babel-loader迁移到ts-loader也需要它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57988934

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档