I have an existing CRA app I am trying to migrate to Vite. One of the dependencies is pulling in Colorize and that seems to be trying to access process.argv and I get the following error
TypeError: Cannot read properties of undefined (reading 'indexOf')
at module2.exports (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:445:32)
at node_modules/@colors/colors/lib/system/supports-colors.js (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:461:9)
at __require2 (http://localhost:6006/node_modules/.vite-storybook/deps/chunk-LFBQMW2U.js?v=b9aa83b9:19:50)
at node_modules/@colors/colors/lib/colors.js (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:892:28)
at __require2 (http://localhost:6006/node_modules/.vite-storybook/deps/chunk-LFBQMW2U.js?v=b9aa83b9:19:50)
at node_modules/@colors/colors/safe.js (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:1029:18)
at __require2 (http://localhost:6006/node_modules/.vite-storybook/deps/chunk-LFBQMW2U.js?v=b9aa83b9:19:50)
at node_modules/logform/dist/colorize.js (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:1179:18)
at __require2 (http://localhost:6006/node_modules/.vite-storybook/deps/chunk-LFBQMW2U.js?v=b9aa83b9:19:50)
at node_modules/logform/dist/levels.js (http://localhost:6006/node_modules/.vite-storybook/deps/@api-common_esm_utils.js?v=b9aa83b9:1268:20)
Wanted to check if there is a way to initialise argv and is there a way to add source maps Storybooks tsconfig sourcemaps don't seem to be applying?