RollupError: "typeOf" is not exported by "node_modules/react-is/index.js", imported by "node_modules/styled-components/dist/styled-components.browser.esm.js #13400
-
Describe the bugHello guys, I'm having a error in my vite (react + ts) when I try to BUILD it (yarn build). if someone can help me, I will appreciate it. Repo: https://github.com/jonasmarco/contact-book Error: Reproductionhttps://github.com/jonasmarco/contact-book Steps to reproduce
System InfoSystem:
OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 2.83 GB / 7.70 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
npmPackages:
@vitejs/plugin-react: ^3.1.0 => 3.1.0
vite: ^4.2.1 => 4.3.9 Used Package Manageryarn LogsNo response Validations
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is happening because |
Beta Was this translation helpful? Give feedback.
This is happening because
react-is
is a CJS dependency but you're disabling commonjs support.https://github.com/jonasmarco/contact-book/blob/0383036cac22cf6639421471941eaf6a25d01db2/vite.config.ts#L14-L16