taco
Vite + Codemirror in SvelteKit 4 broken due to @codemirror/state being loaded twice
I am trying to migrate the SvelteKit project from Node to Deno, and this issue is preventing me from switching over.
The npm modules installed alongside SvelteKit 4 needed to reproduce are
codemirror @codemirror/lang-json
I would imagine that being able to change the .deno
directory to somewhere outside of node_modules
would fix this.
This is the error received in the browser on load:
Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
The 2 instances being loaded in the browser are at:
node_modules/@codemirror/state/dist/index.js
node_modules/.deno/@codemirror+state@6.5.2/node_modules/@codemirror/state/dist
This is running in the denoland/deno:alpine docker container.
Deno version (in the container):
I have tried to deny .deno in vite.config.js in server/fs/deny. Neither denying node_modules/.deno or denying .deno work.
4 replies
JSDoc inline import with Deno LSP does not find or apply type from npm package
Hello!
When using the Deno LSP (tested in both VSCode with Deno for VSCode v3.43.2 and neovim with coc-deno 3.15.0), JSDoc imports from npm packages are not working.
In the same project before initializing the Deno LSP, everything is found and functional with tsserver.
I'm running Deno 2.1.3-1 on Arch Linux, kernel 6.6.63-1-lts
Steps to reproduce, in a new folder:
This results in this deno.json:
In index.js:
Removing the . after import('pg') and placing it back causes tsserver to give all types from @types/pg. Nothing happens with the Deno LSP.
The same exact thing can be seen with
With the Deno LSP, the type for pool is:
With tsserver, the type is:
The deno LSP status is in the attached text.
1 replies