Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme imports don't work #36

Open
suhjohn opened this issue Mar 10, 2024 · 10 comments
Open

Theme imports don't work #36

suhjohn opened this issue Mar 10, 2024 · 10 comments

Comments

@suhjohn
Copy link

suhjohn commented Mar 10, 2024

Screenshot 2024-03-10 at 12 01 46 AM Screenshot 2024-03-10 at 12 01 53 AM

Pretty straightforward issue. 2.0.0-alpha.17

@jaywcjlove
Copy link
Member

@suhjohn Upgrade v2.0.0-alpha.18

@ductridev
Copy link

@uiw/react-json-view: ^2.0.0-alpha.24
error: Error: Unable to resolve module @uiw/react-json-view/light

@jaywcjlove
Copy link
Member

image

@ductridev It seems to be working.

image

@ductridev
Copy link

ductridev commented Apr 23, 2024

Just need to run npm i @uiw/react-json-view right?

@jaywcjlove
Copy link
Member

@ductridev npm i @uiw/[email protected]

@ductridev
Copy link

Ah, still same even file exists.

error: Error: Unable to resolve module @uiw/react-json-view/light from G:\Android\xxx\src\screens\Tab.tsx: @uiw/react-json-view/light could not be found within the project or in these directories:
  node_modules
  11 | import JsonView from '@uiw/react-json-view';
> 12 | import { lightTheme } from '@uiw/react-json-view/light';

@jaywcjlove
Copy link
Member

@ductridev I can't assist you as I can't reproduce your error.

@jrodden1
Copy link

What versions of React are you guys using? @jaywcjlove @ductridev
I wonder if one is on 18 and one on 17? Perhaps that why @jaywcjlove wasn't able to repro the issue?

I'm on 17 and I'm getting that same lightTheme error on 2.0.0-alpha.26 🤔

@jaywcjlove
Copy link
Member

@jrodden1 You can provide me with an example that reproduces the error, and I can take a look at it for you.

@b4hdr
Copy link

b4hdr commented Dec 16, 2024

From Chatgpt:

// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  optimizeDeps: {
    include: ['@uiw/react-json-view'],
  },
});

This helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants