Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno task dev fails in nextjs app created with app router #23402

Closed
satyarohith opened this issue Apr 16, 2024 · 3 comments
Closed

deno task dev fails in nextjs app created with app router #23402

satyarohith opened this issue Apr 16, 2024 · 3 comments
Labels
bug Something isn't working correctly node API polyfill Related to various "node:*" modules APIs node compat

Comments

@satyarohith
Copy link
Member

Version: Deno 1.42.4

➜  deno run --unstable-fs -A npm:create-next-app@latest
✔ What is your project named? … my-app
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias (@/*)? … No / Yes
Creating a new Next.js app in /Users/sr/c/denoland/deno/my-app.

Using npm.

Initializing project with template: app-tw


Installing dependencies:
- react
- react-dom
- next

Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- postcss
- tailwindcss
- eslint
- eslint-config-next


added 360 packages, and audited 361 packages in 31s

133 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Success! Created my-app at /Users/sr/c/denoland/deno/my-app

➜ cd my-app
➜ deno task dev
Task dev next dev
error: npm package '@next/swc' does not exist.
error: Uncaught (in promise) TypeError: Unknown signal: 0
    at toDenoSignal (ext:deno_node/internal/child_process.ts:257:11)
    at ChildProcess.kill (ext:deno_node/internal/child_process.ts:172:53)
    at handleSessionStop (file:///Users/sr/c/denoland/deno/my-app/node_modules/.deno/next@14.2.1/node_modules/next/dist/cli/next-dev.js:84:51)
    at ChildProcess.<anonymous> (file:///Users/sr/c/denoland/deno/my-app/node_modules/.deno/next@14.2.1/node_modules/next/dist/cli/next-dev.js:253:23)
    at ChildProcess.emit (ext:deno_node/_events.mjs:386:28)
    at ext:deno_node/internal/child_process.ts:154:16
    at eventLoopTick (ext:core/01_core.js:168:7)
@satyarohith satyarohith added bug Something isn't working correctly node compat labels Apr 16, 2024
@bartlomieju bartlomieju added the node API polyfill Related to various "node:*" modules APIs label Apr 16, 2024
@bartlomieju
Copy link
Member

This is related to node:child_process module

@littledivy
Copy link
Member

littledivy commented Apr 16, 2024

@satyarohith Did you try with DENO_FUTURE=1? I think this is fixed by BYONM

@littledivy
Copy link
Member

~/my-app $ DENO_FUTURE=1 deno task dev
Task dev next dev
   ▲ Next.js 14.1.3
   - Local:        http://localhost:3000

 ✓ Ready in 2.2s
 ○ Compiling / ...
 ✓ Compiled / in 5.5s (511 modules)
 ✓ Compiled in 381ms (241 modules)

Works using DENO_FUTURE=1 and { unstable: ["fs"] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node API polyfill Related to various "node:*" modules APIs node compat
Projects
None yet
Development

No branches or pull requests

3 participants