Comments (7)
Appears to be a duplicate of #31
Does this fix work for you?
from jotai-devtools.
Re-opening this — This is fixed only for Next JS version 13 >= and continues to fail for Next JS 12
from jotai-devtools.
Recommended fix for Next JS V12
See CodeSandbox
yarn add next-transpile-modules@^9.1.0
#or
npm install next-transpile-modules@^9.1.0 --save
In your next.config.js
const withTranspileModules = require("next-transpile-modules")([
"jotai-devtools",
]);
const nextConfig = {
// ... your config
};
module.exports = withTranspileModules(nextConfig);
from jotai-devtools.
I'll close this for now, please feel free to re-open it and/or reach out again if you run into any issues 🙌
from jotai-devtools.
I have the same issue with plain ViteJS/Vitest when running tests (works ok with run and build).
Any ideas how to fix?
Repro: https://codesandbox.io/p/sandbox/jotai-devtools-commonjs-error-vitest-forked-6srx88
yarn test
FAIL src/App.test.tsx [ src/App.test.tsx ]
SyntaxError: Named export 'IconSun' not found. The requested module '@tabler/icons' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@tabler/icons';
from jotai-devtools.
Thanks for the repro! @mwisnicki
I'll prioritize a long-term fix for vitejs in the coming months. Does this workaround work for the time being?
// in vite.config.ts
export default defineConfig({
plugins: [react()],
+ ssr: {
+ noExternal: ["jotai-devtools"],
+ },
});
from jotai-devtools.
@arjunvegda thanks, that did the trick!
from jotai-devtools.
Related Issues (20)
- Uncaught ReferenceError: process is not defined (jsondiffpatch) HOT 4
- Issue with NextJs 13 and Mantine v7 HOT 2
- Feature request: make the UI minimize on ESC
- Chrome Extension?
- How can i use devtools in build for test server
- Atom rendering hangs on complex objects (such as the Firebase User object) HOT 4
- jotai-devtools not working with PNPM (declare jotai as a dependency) HOT 2
- Devtools error/crashing with NextJS 14.1 HOT 8
- [Feature Request] Trace source of atom updates
- [Feature Request] Performance Profiling Tools
- [Feature Request] Improve `jotai-scope` support HOT 1
- Missing style.css HOT 2
- CSS leaking HOT 17
- MantineThemeProvider.tsx:11 Uncaught Error: @mantine/core: MantineProvider was not found in component tree, make sure you have it in your app HOT 2
- Dark mode selection forgotten after page refresh HOT 1
- Build breaking in NextJS 13.2 HOT 3
- @tabler/icons-react dependency is huge HOT 6
- jotai + vite + react: Unable to Use jotai-devtools HOT 1
- can we use this in production builds?
- If I use npm v7.x or later, do I need to install emotion? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jotai-devtools.