Open Jared-Dahlke opened 1 year ago
i found out i get the same error if i run in Nextjs pages dir as well. Still unable to figure out how to fix
Hey Jared
Have you tried the example project ? looks like a local issue.
The example project is a vite app….
Sent from Proton Mail for iOS
On Wed, Aug 30, 2023 at 12:19 AM, rajeshbabu-oviva @.***(mailto:On Wed, Aug 30, 2023 at 12:19 AM, rajeshbabu-oviva < wrote:
Hey Jared
Have you tried the example project ? looks like a local issue.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@rajeshbabu-oviva-ag it works great with the vite app. But if you try to use it with a Nextjs app you will get that error
@Jared-Dahlke Did you find any solution? I managed to make it work by removing "type": "module" and modifying postcss.config.js to:
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, }, };
@Jared-Dahlke Did you find any solution? I managed to make it work by removing "type": "module" and modifying postcss.config.js to:
`
module.exports = {
plugins: {
tailwindcss: {}, autoprefixer: {},
},
};
`
I ended up using the tsup-tutorial repo, I don't have the link handy but just search it .
This works great in the vite example but gives an error if you try to import one of the components into a Nextjs App dir page.
steps to reproduce:
npx create-next-app@latest
, give it a name, and use all of the default settings. (app dir, tailwind, etc.)npm i
use client
at the top.page.tsx
import { Button } from "shadcn-ui-library-starter"
<Button>Click me </Button>
expected: no errors, button is shown on example next app home page actual: get an error:
I'm going to see if i can fix this. if i can I will report back here. If you know how please let me know.
Cheers