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

Errors when using just Deno for NextJS app #26483

Closed
ss153g opened this issue Oct 22, 2024 · 1 comment
Closed

Errors when using just Deno for NextJS app #26483

ss153g opened this issue Oct 22, 2024 · 1 comment

Comments

@ss153g
Copy link

ss153g commented Oct 22, 2024

I'm trying to use Deno 2.02 for installing NextJS but getting errors.

deno run -A npm:create-next-app@latest

✔ What is your project named? … next-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/xxxxxxxxxxx/next-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

error: Uncaught Error: spawnSync npm ENOENT at __node_internal_captureLargerStackTrace (ext:deno_node/internal/errors.ts:93:9) at __node_internal_errnoException (ext:deno_node/internal/errors.ts:141:10) at _createSpawnSyncError (ext:deno_node/internal/child_process.ts:685:17) at new ChildProcess (ext:deno_node/internal/child_process.ts:287:13) at Object.spawn (node:child_process:120:10) at spawn (file:///Users/xxxxxxxxxxx/Library/Caches/deno/npm/registry.npmjs.org/create-next-app/14.2.15/dist/index.js:7:76725) at file:///Users/xxxxxxxxxxx/Library/Caches/deno/npm/registry.npmjs.org/create-next-app/14.2.15/dist/index.js:73:33444 at new Promise (<anonymous>) at install (file:///Users/xxxxxxxxxxx/Library/Caches/deno/npm/registry.npmjs.org/create-next-app/14.2.15/dist/index.js:73:33412) at installTemplate (file:///Users/xxxxxxxxxxx/Library/Caches/deno/npm/registry.npmjs.org/create-next-app/14.2.15/dist/index.js:73:40032)

@littledivy
Copy link
Member

Duplicate of #26232

create-next-app is trying to spawn npm but it is not available in your PATH env. There is not much Deno can do here unless Next.js folks add --skip-install or --use-deno flag. In the meantime you need to install npm

greatvivek11 added a commit to greatvivek11/docs that referenced this issue Nov 20, 2024
The existing installation step doesn't work!! See https://questions.deno.com/m/1294573642491105343
denoland/deno#26483

Some people may also want to migrate their existing Next13/14 apps to Deno2. This will help them clarify better instead of getting the latest Next setup with deno2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants