'expo version command shows running scripts disabled on this machine
I am trying to develop a react native project in my Windows 10 machine. I installed node js then expo cli via visual studio code terminal. Then I tried the command expo --version, the terminal shows error::
expo : File C:\Users\saka\AppData\Roaming\npm\expo.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ expo --version
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
the given link shows many things, but what shall I do to solve my problem? Thank You!!!
Solution 1:[1]
Step1 : start power shell in administrator mode.
Step2 : Type the following command "set-ExecutionPolicy RemoteSigned"
Step3: Press Y for your Confirmation.
Solution 2:[2]
Paste this code in your terminal
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Press Enter
Enjoy :)
Solution 3:[3]
Trying to run expo start command via the integrated terminal of visual studio IDE which is by default not authorized.
In such case you open the CMD and run it as an administrator and then type expo start in the project directory. This will work.
For more information please visit this link
Solution 4:[4]
Step 1: You need to open your power shell or command line with ‘Run as Administrator’ by right-clicking on its icon.
Step 2: You need to type in the following command:
Set-ExecutionPolicy RemoteSigned
Step 3: You will see the following message and permission request. Type ‘a’ and enter
Solution 2:
Try running the following command in PowerShell after running as administrator.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy unrestricted
Now go and tried installing and then running ‘Expo’
Solution 5:[5]
Solution 1:
Trying to run expo start command via the integrated terminal of visual studio IDE which is by default not authorized.
In such a case, you open the CMD and run it as an administrator mode and then type expo --version in the project directory. This will work.
Solution 2:
Try running the following command in PowerShell after running as administrator mode.
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy unrestricted type A Yes to All
Now go and tried installing and then running ‘Expo’
Solution 6:[6]
In case You are using Command Prompt follow this:
- Open CMD and Run it as Administrator
2: Run this command: powershell.exe Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy unrestricted
- run: expo & you have all set
Solution 7:[7]
. Open Settings, and click/tap on the Update & security icon. 2. Click/tap on For developers on the left side, check the Change execution policy to allow local PowerShell scripts to run without signing. Require signing for remote scripts. box under PowerShell on the right side, and click/tap on the Apply button.
do this thing your problem must be solve if u r windows 10 user
100% Working
Solution 8:[8]
How to set PowerShell script execution policy within Visual Studio Code:
Open Settings, and click/tap on the Update & security icon. 2. Click/tap on For developers on the left side, check the Change execution policy to allow local PowerShell scripts to run without signing. Require signing for remote scripts. box under PowerShell on the right side, and click/tap on the Apply button.
do this thing your problem must be solve if u r windows 10 user
Solution 9:[9]
Issue:
I faced the same issue while using expo commands on windows
powerShellapp.
Solution:
But when I ran the same command on
windows cmd. No error came. everything worked fine
Solution 10:[10]
This occurred while I was working in the VSCode terminal and the default option was PowerShell, I changed it to the cmd and it appears to be fixed. In my opinion, this is a much better fix than allowing any script to be executed by PowerShell.
Solution 11:[11]
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
Solution 12:[12]
The following will fetch you all the headlines from current loaded page. You would need RSelenium to if you need to scroll and further extract data.
library(rvest)
url = 'https://news.google.com/topstories?hl=en-GB&gl=GB&ceid=GB:en'
url %>% read_html() %>% html_nodes('.lBwEZb') %>%
html_nodes('.DY5T1d') %>%
html_text()
[1] "Liz Truss to hold Brexit talks with EU over NI protocol"
[2] "Lord Frost: I didn't support PM's coercive Covid plan"
[3] "David Frost: I never disagreed with Boris Johnson over Brexit policy – only coercive Covid rules"
[4] "Look at the lauding of David Frost and see a government deranged by the poison of Brexit"
[5] "What happened to the amiable, hard-working David Frost I once knew?"
[6] "COVID-19: Omicron now dominant variant in US after making up 73% of new cases, says CDC"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
