admin管理员组文章数量:1421750
PS C:\Users\Bonnie_Py\Desktop\fullstack js> create-react-app
react-app create-react-app : File C:\Users\Bonnie_Py Dev\AppData\Roaming\npm\create-react-app.ps1
cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft/fwlink/?LinkID=135170.
At line:1 char:2
+ create-react-app react-app
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\Bonnie_Py\Desktop\fullstack js> create-react-app
react-app create-react-app : File C:\Users\Bonnie_Py Dev\AppData\Roaming\npm\create-react-app.ps1
cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft./fwlink/?LinkID=135170.
At line:1 char:2
+ create-react-app react-app
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Share
Improve this question
edited Mar 10, 2020 at 19:29
Codebling
11.4k3 gold badges44 silver badges70 bronze badges
asked Mar 10, 2020 at 17:15
Bonnie NyamburaBonnie Nyambura
3413 silver badges6 bronze badges
1
- 1 Does this answer your question? PowerShell says "execution of scripts is disabled on this system." – cbr Commented Mar 10, 2020 at 17:54
1 Answer
Reset to default 6Problem:
This error es when the PowerShell execution policy doesn’t allow us to run scripts. I also found the same error when tried to run a PowerShell script.
PowerShell - running scripts is disabled on this system
Solution:
If you do not have admin access, follow the below with mand => "Set-ExecutionPolicy -Scope CurrentUser".
The PowerShell execution policy is default set to Restricted. You can change the PowerShell execution policies with Set-ExecutionPolicy cmdlet. To run outside script set policy to RemoteSigned.
PS C:\> Set-ExecutionPolicy RemoteSigned
Below is the list of four different execution policies in PowerShell
Restricted – No scripts can be run.
AllSigned – Only scripts signed by a trusted publisher can be run.
RemoteSigned – Downloaded scripts must be signed by a trusted publisher.
Unrestricted – All Windows PowerShell scripts can be run.
You Should Also Know:
You can use get the current set execution policy in PowerShell.
PS C:\> get-executionpolicy
You can bypass this policy by adding -ExecutionPolicy ByPass when running PowerShell script.
c:\> powershell -ExecutionPolicy
本文标签: javascriptI am trying to create react app but keeps on telling me unauthorized accessStack Overflow
版权声明:本文标题:javascript - I am trying to create react app but keeps on telling me unauthorized access - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745349980a2654706.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论