-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
I was excited to try out deno on Next.JS after hearing about it on the syntax podcast. It runs well but unfortunately I'm getting a couple of type errors when importing the next core components like next/link
and next/image
.
This only happens in the editor with the LSP so it might not be the right place to post it so let me know.
For good measure in the project that I found it in I tried copy and pasting the compiler options into deno.json
. It had no effect.
JSX element type 'Link' does not have any construct or call signatures.deno-ts(2604)
'Link' cannot be used as a JSX component.
Its type 'typeof import("file:///Users/richardvanbergen/code/deno-nextjs-bug-example/node_modules/.deno/next@14.2.7/node_modules/next/link")' is not a valid JSX element type.deno-ts(2786)
JSX element type 'Image' does not have any construct or call signatures.deno-ts(2604)
'Image' cannot be used as a JSX component.
Its type 'typeof import("file:///Users/richardvanbergen/code/deno-nextjs-bug-example/node_modules/.deno/next@14.2.7/node_modules/next/image")' is not a valid JSX element type.deno-ts(2786)
Reproduction Steps:
- Download the repo from the link below
- Enable Deno from the menu command bar
Deno: Enable
- Ensure Deno Future is checked in the user settings
- Just for good measure, add
DENO_FUTURE=1
explicitly in the settings. - Navigate to
src/app/page.tsx
. - Behold! Errors!
Version: Deno 1.46.2
Reproduction repo: https://github.com/richardvanbergen/deno-nextjs-bug-example
Side note: I can deal with it but is there a way to enable wildcard import aliases?
Side side note: There's also an error importing the styles I personally don't care about that but if it's easy to answer then it might be worth documenting it.