Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
846 views
in Technique[技术] by (71.8m points)

react native - 'expo' is not recognized as an internal or external command, operable program or batch file

I am getting this error when I try to use expo commands.

npm ERR! code EPERM npm ERR! syscall rename npm ERR! path C:UsersSriAppDataRoaming pm ode_modulesexpo-cli npm ERR! dest C:UsersSriAppDataRoaming pm ode_modules.expo-cli-JgrrLjT2 npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, rename 'C:UsersSriAppDataRoaming pm ode_modulesexpo-cli' -> 'C:UsersSriAppDataRoaming pm ode_modules.expo-cli-JgrrLjT2' npm ERR! [Error: EPERM: operation not permitted, rename 'C:UsersSriAppDataRoaming pm ode_modulesexpo-cli' -> 'C:UsersSriAppDataRoaming pm ode_modules.expo-cli-JgrrLjT2'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:UsersSriAppDataRoaming pm ode_modulesexpo-cli', npm ERR! dest: 'C:UsersSriAppDataRoaming pm ode_modules.expo-cli-JgrrLjT2' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR!
C:UsersSriAppDataLocal pm-cache_logs2020-12-31T06_02_09_505Z-debug.log

C:UsersSriAppDataRoaming pm ode_modulesexpo-cli

I followed the above path and found that expo-cli folder was there but when I try to init or uninstall expo it says 'expo' is not recognized as internal or external command.

question from:https://stackoverflow.com/questions/65517335/expo-is-not-recognized-as-an-internal-or-external-command-operable-program-or

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

if your in right directory perhaps the binary you are trying to execute does'nt exist there ,maybe the executable is named something else and if you are trying from another directory you should add the executable to system variables here's the link to do so


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...