Polaris
Creating Deno.json wrecks Next.js project
Did some further research and the way forward seems to be to not use the Deno extension in VSCode for this use case.
Can't fully migrate to a Deno.json as there seem to be a few default compiler options in the project's tscofing that can't be mapped in Deno.json? (can be wrong here)
The workaround seems to be to just add
@types/deno
as a dev dependency in package.json (https://www.reddit.com/r/Deno/s/oW20RKgbbI)
Also, had to remove the initial node_modules and package.lock.json and run deno install
as the next cli seems to run npm install
during the init process.
Things seem good so far with this workaround34 replies
Creating Deno.json wrecks Next.js project
To recreate:
(using VSCode as the IDE, not sure if this is IDE specific)
Create a Next.js Project (use all defaults):
deno run -A npm:create-next-app@latest
cd
into the project directory and initialize shadcn (you may use all defaults):
deno -A npm:shadcn@latest init
Add something:
deno run -A npm:shadcn@latest add login-03
At this point run the project and glance through code, everything should be fine.
deno task dev
Now create an empty deno.json
in the root and save the file.
You'll see a bunch of errors emerge in the IDE, project will work fine if you try to run it.34 replies