gpt4 book ai didi

react-native - Spawn cmd.exe 运行 native 项目时出现 Enoent 错误

转载 作者:行者123 更新时间:2023-12-04 05:23:26 24 4
gpt4 key购买 nike

我已经使用 react-native init HelloWorld 制作了一个 React Native 项目。当我使用 react-native run-android 运行这个项目时,我收到了这个错误。

events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn cmd.exe ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

运行react-native info

Scanning folders for symlinks in D:\Work\_mine\react- 
native\HelloWorld\node_modules (37ms)

React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 9.10 GB / 15.89 GB
Binaries:
Yarn: 1.6.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: AI-173.4907809

我对问题一无所知。

最佳答案

如果有人在添加环境变量后仍然有问题,试试这个

export PATH="$PATH:/mnt/c/Windows/System32"

+ 命令(在同一行)

关于react-native - Spawn cmd.exe 运行 native 项目时出现 Enoent 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52170312/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com