deno
deno copied to clipboard
Support Qwik City (dev server)
Platform
Darwin 22.6.0 arm64 arm
Version
deno 1.37.0
Repro
-
deno run -A npm:[email protected]
(UPDATE: works from v1.4.1) -
deno task dev
Expected
Dev server start
Actual
➜ deno task dev
Warning Currently only basic package.json `scripts` are supported. Programs like `rimraf` or `cross-env` will not work correctly. This will be fixed in an upcoming release.
Task dev vite --mode ssr
error when starting dev server:
Error:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-darwin-arm64v8.node'
Require stack:
- /Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/sharp.js
- /Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/constructor.js
- /Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/index.js
- /Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/index.js
Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current darwin-arm64v8 runtime: "npm install --platform=darwin --arch=arm64v8 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
at Object.<anonymous> (file:///Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/sharp.js:37:9)
at Object.<anonymous> (file:///Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/sharp.js:40:4)
at Module._compile (node:module:733:34)
at Object.Module._extensions..js (node:module:747:10)
at Module.load (node:module:658:32)
at Function.Module._load (node:module:539:12)
at Module.require (node:module:677:19)
at require (node:module:791:16)
at Object.<anonymous> (file:///Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/constructor.js:11:1)
at Object.<anonymous> (file:///Users/admin/repos/qwik-test/qwik-app/node_modules/.deno/[email protected]/node_modules/sharp/lib/constructor.js:441:4)
Related to:
- (Sharp issue) #16164
- #20071
Now we wait for Qwik 1.3 to come out (should be soon), and re-assess the status again
Alright, this is the new situation with qwik 1.3
➜ deno task dev
Task dev vite --mode ssr
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
error when starting dev server:
Error: Platform not supported
at loadPlatformBinding (file:///Users/admin/repos/qwik-app/node_modules/.deno/@[email protected]/node_modules/@builder.io/qwik/optimizer.cjs:1367:11)
at createOptimizer (file:///Users/admin/repos/qwik-app/node_modules/.deno/@[email protected]/node_modules/@builder.io/qwik/optimizer.cjs:1396:93)
at async Object.init2 [as init] (file:///Users/admin/repos/qwik-app/node_modules/.deno/@[email protected]/node_modules/@builder.io/qwik/optimizer.cjs:1760:49)
at async config (file:///Users/admin/repos/qwik-app/node_modules/.deno/@[email protected]/node_modules/@builder.io/qwik/optimizer.cjs:3163:9)
at async runConfigHook (file:///Users/admin/repos/qwik-app/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:66218:25)
at async resolveConfig (file:///Users/admin/repos/qwik-app/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:65661:14)
at async _createServer (file:///Users/admin/repos/qwik-app/node_modules/.deno/[email protected]/node_modules/vite/dist/node/chunks/dep-3b8eb186.js:64905:20)
at async CAC.<anonymous> (file:///Users/admin/repos/qwik-app/node_modules/.deno/[email protected]/node_modules/vite/dist/node/cli.js:743:24)
Just tried with latest qwik (1.4.1), and things are working in dev mode! It's a small thing, but I get all these deprecation warnings though:
➜ deno task dev
Task dev vite --mode ssr
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.
VITE v5.0.12 ready in 1479 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
warning: Use of deprecated "Deno.stdin.rid" API. This API will be removed in Deno 2.
hint: Use `Deno.stdin` instance methods instead.
❗️ Expect significant performance loss in development.
❗️ Disabling the browser's cache results in waterfall requests.
warning: Use of deprecated "Deno.TcpConn.rid" API. This API will be removed in Deno 2.
Stack trace:
at ext:deno_http/00_serve.js:455:24
hint: Use `Deno.TcpConn` instance methods instead.
hint: It appears this API is used by a remote dependency. Try upgrading to the latest version of that dependency.
warning: Use of deprecated "Deno.TcpConn.rid" API. This API will be removed in Deno 2.
hint: Use `Deno.TcpConn` instance methods instead.
warning: Use of deprecated "Deno.TcpConn.rid" API. This API will be removed in Deno 2.
hint: Use `Deno.TcpConn` instance methods instead.
warning: Use of deprecated "Deno.TcpConn.rid" API. This API will be removed in Deno 2.
hint: Use `Deno.TcpConn` instance methods instead.
warning: Use of deprecated "Deno.FsFile.rid" API. This API will be removed in Deno 2.
Stack trace:
at ext:deno_node/_fs/_fs_open.ts:78:96
hint: Use `Deno.FsFile` methods directly instead.
hint: It appears this API is used by a remote dependency. Try upgrading to the latest version of that dependency.
The deno task build
gives this error:
npm run build.types
npm run build.client
npm run lint
> build.types
> tsc --incremental --noEmit
> build.client
> vite build
sh: vite: command not found
Warning: Not implemented: ChildProcess.prototype.disconnect
CC @littledivy could you take a look at that? We should now support disconnect
event in ChildProcess
.
Alright, so now the deno task build
returns just (no disconnect warning):
> build.client
> vite build
sh: vite: command not found
This is most likely caused by the fact that we don't set up proper entries in node_modules/.bin/
directory.
@bartlomieju , it would probably solve a multiple issues (at least remix as well)
Related
- https://github.com/denoland/deno/pull/23496
- https://github.com/denoland/deno/issues/23036