Expo CLI未被认可
我试图创建一个新的React-Native应用程序并创建它,我需要CLI,因此我通过NPM安装了它,但是在尝试运行EXPO INIT之后。...错误响应均为以下内容:
EXPO:expo:术语'' Expo'不被认为是CMDLET,功能,脚本文件或可操作程序的名称。检查名称的拼写,或者如果包括路径,请验证该路径是否正确,然后重试。 在线:1个char:1
- 世博int _______
+ categoryInfo:objectNotFound :( expo:string)[],commandnotfoundexception +完全QualifiedErrid:CommandnotFoundException
感谢任何帮助,谢谢。
im trying to create a new react-native app and to create it i need the expo CLI so i installed it via npm but then after trying to run expo init.... an error response occrured as the following:
expo : The term 'expo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- expo init _______
+ CategoryInfo : ObjectNotFound: (expo:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Would apperciate any help, Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您可以共享其他有用的屏幕截图。
一件事超级容易忽略的是路径。
例如,您
在该文件夹中创建一个新的文件夹“ myApp”,您运行npm install/expo init/etc。
这样做的是在该文件夹中创建另一个文件夹。
因此,您的新路径应为C:// PATH/MYAPP/MYAPP,
如果您使用屏幕截图/更多信息编辑问题,那么我可以给出一个更详细的答案。
If you could share additional screenshots that would be helpful.
One thing that is super easy to overlook is the path.
For example, you create a new folder "myApp"
Inside that folder you run npm install/expo init/etc.
What this does is creates another folder inside that one.
So your new path should be C://path/myApp/myApp
If you edit your question with screen shots/more info, then I can give a more detailed answer.
我之前和这里有一些问题要尝试:
npm I -G expo-cli
expo.ps1的线路获取消息无法加载,因为在此系统上禁用了脚本的执行。
您需要启用脚本执行。确定所需的脚本执行范围。选择是限制的(如果您收到此消息,当前设置),allsigned
,无限制
和远程设计
(可能是您想要的)。然后打开PowerShell作为管理员并运行%userProfile%\ AppData \ roaming \ roaming \ npm
)I had this issue before and here are some things to try:
npm i -g expo-cli
expo.ps1 cannot load because the execution of scripts is disabled on this system.
you need to enable script execution. Decide on the script execution scope you want. Choices are Restricted (the current setting if you are getting this message),AllSigned
,Unrestricted
, andRemoteSigned
(probably the one you want). Then open PowerShell as an admin and run%USERPROFILE%\appData\Roaming\npm
)