[英]npm start not working for react native setup
Hei, I'm new to programming and trying to Setup my toolchain and create a new React Native project.嘿,我是编程新手,正在尝试设置我的工具链并创建一个新的 React Native 项目。
I have done these but I get this error when I write in my VScode npm run我已经完成了这些,但是当我在 VScode npm run 中写入时出现此错误
expo start博览会开始
Starting project at C:\\Users\\35845\\Documents\\ReactNativeProject\\MyApp在 C:\\Users\\35845\\Documents\\ReactNativeProject\\MyApp 启动项目
Expo DevTools is running at http://localhost:19002 Expo DevTools 运行在 http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)在浏览器中打开 DevTools...(按 shift-d 禁用)
Error: spawn powershell ENOENT错误:生成 powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)在 Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)* at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! npm 错误! code ELIFECYCLE
代码生命周期
npm ERR! npm 错误! errno 1
错误号 1
npm ERR! npm 错误! @ start:
expo start
@开始:
expo start
npm ERR! npm 错误! Exit status 1
退出状态 1
npm ERR! npm 错误!
npm ERR! npm 错误! Failed at the @ start script.
@start 脚本失败。
npm ERR! npm 错误! This is probably not a problem with npm.
这可能不是 npm 的问题。 There is likely additional logging output above.
上面可能有额外的日志输出。
npm ERR! npm 错误! A complete log of this run can be found in:
可以在以下位置找到此运行的完整日志:
npm ERR! npm 错误! C:\\Users\\35845\\AppData\\Roaming\\npm-cache_logs\\2020-08-26T08_53_44_736Z-debug.log
C:\\Users\\35845\\AppData\\Roaming\\npm-cache_logs\\2020-08-26T08_53_44_736Z-debug.log
Can someone please help me with this.有人可以帮我解决这个问题。 Thank you
谢谢
use cmd instead of git bash or PowerShell on windows and try below steps and run:-在 Windows 上使用 cmd 而不是 git bash 或 PowerShell 并尝试以下步骤并运行:-
Delete node_modules folder
run npm cache clean --force
npm install
expo start
make sure you are inside your application folder (where package.json is present)确保你在你的应用程序文件夹中(package.json 所在的位置)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.