【问题标题】:I have been trying to create a react app but I always experience this problem我一直在尝试创建一个反应应用程序,但我总是遇到这个问题
【发布时间】:2021-12-30 02:10:39
【问题描述】:

每当我尝试运行 npxnpm 命令时,它们总是返回此错误:

'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe";c:#python34."
npm ERR! path C:\Users\user\Desktop\React-Apps
npm ERR! errno -4058
npm ERR! enoent spawn C:\Windows\system32\cmd.exe";c:#python34." ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2021-11-19T08_56_16_871Z-debug.log

请帮忙

【问题讨论】:

标签: node.js reactjs npm npx


【解决方案1】:

在您的环境变量中设置 node.js 的路径。为此:

  1. 右击我的电脑->属性->高级系统设置->环境变量->在系统变量中选择&编辑“路径”变量。

2)在路径中添加C:\Program Files\nodejs\;

3)重新启动命令提示符

4)在新的控制台窗口中输入node --version,版本号应显示为响应。

【讨论】:

    猜你喜欢
    • 2021-03-03
    • 2012-07-16
    • 2021-12-25
    • 1970-01-01
    • 1970-01-01
    • 2022-12-25
    • 2021-06-14
    • 1970-01-01
    • 2021-11-27
    相关资源
    最近更新 更多