@mrtaxi48

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

node.jsを導入したいのですが、エラーが出て解決できません

解決したいこと

node.jsを導入したいのですが、エラーが出て解決できません。

例)やったこと
npx create-next-app sample-app←と入力すると以下の質問に答えていく

1? Would you like to use TypeScript with this project? » No / Yes
2? Would you like to use ESLint with this project? » No / Yes
3? Would you like to use src/ directory with this project? » No / Yes
4? Would you like to use experimental app/ directory with this project? » No / Yes
5? What import alias would you like configured? » @/* 何もせずエンター

すると

出ているエラーメッセージ

Using npm.

Installing dependencies:

  • react
  • react-dom
  • next
  • @next/font
  • typescript
  • @types/react
  • @types/node
  • @types/react-dom
  • eslint
  • eslint-config-next

Aborting installation.
Unexpected error. Please report it as a bug:
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:413:11)
at Object.spawn (node:child_process:700:9)
 at spawn (C:\Users\kouji\AppData\Local\npm-
cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:44:7594)
at C:\Users\kouji\AppData\Local\npm-cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:325:18926
at new Promise ()
at install (C:\Users\kouji\AppData\Local\npm-cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:325:18419)
at installTemplate (C:\Users\kouji\AppData\Local\npm-cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:325:21528)
at createApp (C:\Users\kouji\AppData\Local\npm-cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:325:25594)
at async run (C:\Users\kouji\AppData\Local\npm-cache_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:325:33586) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}

自分で試したこと

検索してもヒットせずにどう解決していかばいいか分かりません。

0 likes

1Answer

その手順でやることはNextJSのプロジェクト作成ですが,現在はNode.jsをインストールしたいのかNextをインストールしたいのかどちらなのでしょうか?
OSなどの情報も記載してください.

1Like

Comments

  1. @mrtaxi48

    Questioner

    返信気付くの遅くなりました。すみません!Node.jsをインストールしたいです。osはWindowsを使っています
  2. インストーラがありますので普通にインストールしてください.
    バージョンは余程のことがない限りCurrentではなくLTSを使用すべきです.

    https://nodejs.org/

Your answer might help someone💌