m
m6mo ago

deno2 CLI support

can convex run with deno2?
3 Replies
ballingt
ballingt6mo ago
I haven't tried but I bet it does! Do you see any errors or is anything not working? We don't have deno 1 on the website because there were some compat issues but I imagine are gone with deno2 @m if this works let me know and I'll add it to our docs!
m
mOP6mo ago
Deno 2 is backwards compatible with Node and npm so i guess it'll run
acrefoot
acrefoot2w ago
@ballingt maybe you can shed some light. I tried setting up a new project from scratch using deno (and tanstack start, clerk, but those aren't super-relevant).
$ cat deno.json
{
"tasks": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"convex:dev": "convex dev"
},
"imports": {
"@clerk/tanstack-react-start": "npm:@clerk/tanstack-react-start@^0.13.5",
"@convex-dev/react-query": "npm:@convex-dev/react-query@^0.0.0-alpha.8",
"@std/assert": "jsr:@std/assert@1",
"@tanstack/react-query": "npm:@tanstack/react-query@^5.74.3",
"@tanstack/react-router": "npm:@tanstack/react-router@^1.116.0",
"@tanstack/react-router-with-query": "npm:@tanstack/react-router-with-query@^1.116.0",
"@tanstack/react-start": "npm:@tanstack/react-start@^1.116.1",
"@types/react": "npm:@types/react@^19.1.2",
"@types/react-dom": "npm:@types/react-dom@^19.1.2",
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.4.0",
"convex": "npm:convex@^1.23.0",
"react": "npm:react@^19.1.0",
"react-dom": "npm:react-dom@^19.1.0",
"vinxi": "npm:vinxi@^0.5.4",
"vite-tsconfig-paths": "npm:vite-tsconfig-paths@^5.1.4"
},
"nodeModulesDir": "auto",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"strictNullChecks": true,
"verbatimModuleSyntax": false
},
"unstable": [
"sloppy-imports"
]
}
$ cat deno.json
{
"tasks": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"convex:dev": "convex dev"
},
"imports": {
"@clerk/tanstack-react-start": "npm:@clerk/tanstack-react-start@^0.13.5",
"@convex-dev/react-query": "npm:@convex-dev/react-query@^0.0.0-alpha.8",
"@std/assert": "jsr:@std/assert@1",
"@tanstack/react-query": "npm:@tanstack/react-query@^5.74.3",
"@tanstack/react-router": "npm:@tanstack/react-router@^1.116.0",
"@tanstack/react-router-with-query": "npm:@tanstack/react-router-with-query@^1.116.0",
"@tanstack/react-start": "npm:@tanstack/react-start@^1.116.1",
"@types/react": "npm:@types/react@^19.1.2",
"@types/react-dom": "npm:@types/react-dom@^19.1.2",
"@vitejs/plugin-react": "npm:@vitejs/plugin-react@^4.4.0",
"convex": "npm:convex@^1.23.0",
"react": "npm:react@^19.1.0",
"react-dom": "npm:react-dom@^19.1.0",
"vinxi": "npm:vinxi@^0.5.4",
"vite-tsconfig-paths": "npm:vite-tsconfig-paths@^5.1.4"
},
"nodeModulesDir": "auto",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"strictNullChecks": true,
"verbatimModuleSyntax": false
},
"unstable": [
"sloppy-imports"
]
}
You can get pretty far, but convex dev wants to see convex in the dependencies list of a package.json. So if I understand, I have to keep a package.json just for building the convex functions. Any way to do the function builds more directly with deno tasks? ^ I can run deno task convex:dev, if the package.json is setup, though I haven't checked if the dependency list of package.json is actually used over the imports list in deno.json.

Did you find this page helpful?