Ciantic
Ciantic
DDeno
Created by Ciantic on 10/27/2024 in #help
Vinxi build is trying to run node.exe instead of deno.exe?
Test repo https://github.com/Ciantic/deno-solid-test/ See the error:
$ deno run -A build # this does not work, it gives error like:

Task build vinxi build
vinxi v0.4.3

Building your app...
vinxi v0.4.3
(node:53524) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node.EXE --trace-warnings ...` to show where the warning was created)
ReferenceError: Deno is not defined
at file:///C:/Source/JavaScript/solid-start-test/deno-solid-test/node_modules/.deno/@jsr+std__fs@0.221.0/node_modules/@jsr/std__fs/ensure_symlink.js:7:19
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
$ deno run -A build # this does not work, it gives error like:

Task build vinxi build
vinxi v0.4.3

Building your app...
vinxi v0.4.3
(node:53524) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node.EXE --trace-warnings ...` to show where the warning was created)
ReferenceError: Deno is not defined
at file:///C:/Source/JavaScript/solid-start-test/deno-solid-test/node_modules/.deno/@jsr+std__fs@0.221.0/node_modules/@jsr/std__fs/ensure_symlink.js:7:19
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
Notice node.EXE warning
4 replies
DDeno
Created by Ciantic on 10/23/2024 in #help
Vinxi project such as solid-start doesn't work with Deno 2.0
Here is a repo: https://github.com/Ciantic/deno-solid-test This most likely because Vinxi runs node.exe behind the scenes instead of deno.exe. It's notable that bun also has same error, but it can be fixed by using a flag --bun that fakes bun.exe as node.exe. Maybe deno needs similar functionality as bun.
11.50.18 [vite] Error when evaluating SSR module C:/Source/JavaScript/solid-start-test/deno-solid-test/src/routes/index.tsx?pick=default&pick=$css: failed to import "jsr:@db/sqlite@0.12"
|- Error: Cannot find module 'jsr:@db/sqlite@0.12' imported from 'C:/Source/JavaScript/solid-start-test/deno-solid-test/src/db/db.ts'
at nodeImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:53036:19)
at ssrImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52903:22)
at undefined
at async instantiateModule (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52961:5)
11.50.18 [vite] Error when evaluating SSR module C:/Source/JavaScript/solid-start-test/deno-solid-test/src/routes/index.tsx?pick=default&pick=$css: failed to import "jsr:@db/sqlite@0.12"
|- Error: Cannot find module 'jsr:@db/sqlite@0.12' imported from 'C:/Source/JavaScript/solid-start-test/deno-solid-test/src/db/db.ts'
at nodeImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:53036:19)
at ssrImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52903:22)
at undefined
at async instantiateModule (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52961:5)
4 replies
DDeno
Created by Ciantic on 3/7/2023 in #help
Date-fns typings don't work?
I'm trying this code:
import { startOfDay } from "https://esm.sh/date-fns@2.29.3";

// No error?
let foo = startOfDay("foo");
import { startOfDay } from "https://esm.sh/date-fns@2.29.3";

// No error?
let foo = startOfDay("foo");
I can see that they use declare module in their typings file, is this causing the issue?
7 replies