我想将 Storybook 从 迁移5.0.11到5.2.0但在更改版本后package.json我得到:ERROR in ./node_modules/@storybook/theming/dist/utils.jsModule 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=trueERROR in ./node_modules/@storybook/theming/node_modules/@storybook/client-logger/dist/index.jsModule 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=trueERROR in ./node_modules/@storybook/theming/dist/index.jsModule 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我也在迁移指南中寻找,但没有找到我应该做的事情来完成它。
1 回答
![?](http://img1.sycdn.imooc.com/5333a0780001a6e702200220-100-100.jpg)
蝴蝶不菲
TA贡献1810条经验 获得超4个赞
在解决方案下面(希望这有帮助):
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"declarationMap": false
}
}
迁移依赖项package.json:
"@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。
添加回答
举报
0/150
提交
取消