如何解决 Windows 上的“命令‘节点’拼写错误或找不到”错误?

问题描述 投票:0回答:1

如果我想用

npm start
启动我的 React 项目,我会收到此错误
The command "node" is either misspelled or could not be found.

对于我的项目:

  • 节点v:v22.11.0
  • npm 版本:10.9.0
  • 反应:^18.3.1

我的package.json

{
  "name": "frontend-quizmaster",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^1.7.7",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

  1. 我尝试重新安装node.js。
  2. 还在系统中添加了一个新的路径变量。
reactjs node.js npm package.json npm-scripts
1个回答
0
投票

检查 Node.js 是否已安装 = node -v 将 Node.js 添加到系统路径 重新安装 npm 软件包 npm 启动

这样想会起作用

© www.soinside.com 2019 - 2024. All rights reserved.