DEV Community

Cover image for Expo.ps1 cannot be loaded because running scripts is disabled on this system (Solution)
Osman Forhad
Osman Forhad

Posted on • Updated on

Expo.ps1 cannot be loaded because running scripts is disabled on this system (Solution)

Alt Text
So, if you see this error don’t worry stay cool you can solve this by following this step
.
Step 1: Open Windows PowerShell with Run as Administrator
.
Step 2: use (Get-ExecutionPolicy) this command on Windows PowerShell to see the execution policy
.
Alt Text
Most probably there you would see (Restricted) this command. So, the main reason-running scripts on this system are Restricted.
.
Step 3: Now we need to change this policy to allow the operation. Use this command to make it Unrestricted
.
Use (Set-ExecutionPolicy Unrestricted) this command
.
here you will get a prompt message and you should press 'Y' to change from Restricted to Unrestricted.
That’s it.
.
To ensure, you may check the execution policy by this
(Get-ExecutionPolicy) command again.
The possible output should be (Unrestricted)
.
The problem is solved. Now you can use the expo start command on your machine.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻
developer.osmanforhad@gmail.com

Top comments (13)

Collapse
 
nhrepon profile image
Nhrepon

Thaks a lot. I solve this problem smoothly........... What a great feeling ................

Collapse
 
bulsaraharshil profile image
Harshil Bulsara

I was literally stressed about this thing. Thank you very much

Collapse
 
donyeet23 profile image
DonYeet23

Same i slapped my head 3 times until i found this site

Collapse
 
cyebukayire profile image
Peace

Thank you so much:) You're awesome

Collapse
 
xxbjgdionisioxx profile image
xxbjgdionisioxx

Thank you so much!

Collapse
 
rocion_ profile image
Rocio

Life saver, thank you!!!

Collapse
 
lorettasav profile image
Loretta Savvidou

Thanks for this Osman!

Collapse
 
devpenniel profile image
Tlhonolofatso Mothae • Edited

This works, thanks man 😁😁

Collapse
 
nikkidev profile image
NikkiDev

Helped me <3 Thanks

Collapse
 
noreen_ishaq_nn261 profile image
noreen ishaq

Only Get-ExecutionPolicy command is running
Why Set-ExecutionPolicy Unrestricted command is not runing

Collapse
 
noreen_ishaq_nn261 profile image
noreen ishaq

I am working 1st time on broadcasting in laravel
so when runing laravel-echo-server init command then powershell issue is showing