From 9138bdf6652b7b672d2ee827172d11414deea3aa Mon Sep 17 00:00:00 2001 From: Nozomi Ichihara <31800566+nozomione@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:21:26 -0400 Subject: [PATCH] =?UTF-8?q?(migration)=20resolve=20the=20error=20=E2=80=98?= =?UTF-8?q?Module=20not=20found:=20Error:=20Can't=20resolve=20unfetch=20in?= =?UTF-8?q?=20node=5Fmodules/isomorphic-unfetch'=20at=20compile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .storybook/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index a2fbedc7..40b27546 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,5 +1,6 @@ -const path = require('path') -module.exports = { +import * as path from 'path' + +export default { stories: ['./stories/**/*.stories.@(js|jsx|ts|tsx|mdx)'], addons: [ '@storybook/addon-a11y', @@ -23,6 +24,10 @@ module.exports = { config.resolve.modules.push(path.resolve(__dirname, './../src')) config.resolve.alias['utils'] = path.resolve(__dirname, './utils') + config.resolve.alias['unfetch'] = path.resolve( + __dirname, + './../node_modules/unfetch/dist/unfetch.mjs' + ) // Return the altered config return config }