0

我正在使用 Storybook 并尝试使用 typescript 加载它,我已经按照本教程进行操作,并从create-react-app开始并在项目中运行getstorybook。我很困惑为什么故事书不知道我在创建反应应用程序中的 webpack 设置。

ERROR in [at-loader] ./src/design-system/theme.ts:4:27 
    TS2307: Cannot find module './fonts/Futura-LT-Regular.ttf'.
ERROR in [at-loader] ./src/design-system/theme.ts:5:24 
    TS2307: Cannot find module './fonts/Futura-LT-Bold.ttf'.
ERROR in [at-loader] ./src/design-system/theme.ts:6:30 
    TS2307: Cannot find module './fonts/Caslon-Pro-Regular.otf'.
ERROR in [at-loader] ./src/design-system/Icons.tsx:2:26 
    TS2307: Cannot find module './icons/pulse-logo.svg'.
ERROR in [at-loader] ./src/design-system/Form.tsx:3:24 
    TS2307: Cannot find module './icons/icon-pencil.svg'.
ERROR in [at-loader] ./src/design-system/Loaders.tsx:1:24 
    TS2307: Cannot find module './images/loading.gif'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingIntroduction.tsx:5:23 
    TS2307: Cannot find module '../design-system/icons/signature.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingLaunchProcess.tsx:6:21 
    TS2307: Cannot find module '../design-system/icons/map.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingLaunchProcess.tsx:7:26 
    TS2307: Cannot find module '../design-system/icons/bulls-eye.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingLaunchProcess.tsx:8:23 
    TS2307: Cannot find module '../design-system/icons/globe.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingLaunchProcess.tsx:9:22 
    TS2307: Cannot find module '../design-system/icons/horn.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingLaunchProcess.tsx:10:24 
    TS2307: Cannot find module '../design-system/icons/rocket.svg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingMarketingCollaterals.tsx:5:18 
    TS2307: Cannot find module '../design-system/images/mutc.jpg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingMarketingCollaterals.tsx:6:27 
    TS2307: Cannot find module '../design-system/images/resident-guide.jpg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingMarketingCollaterals.tsx:7:31 
    TS2307: Cannot find module '../design-system/images/training-materials.jpg'.
ERROR in [at-loader] ./src/dashboard-components/OnboardingMarketingCollaterals.tsx:8:18 
    TS2307: Cannot find module '../design-system/images/swag.jpg'.
4

1 回答 1

0

我似乎解决了这个问题,我删除了所有 node_modules,然后再次安装它们。

于 2018-09-13T20:00:12.160 回答