Search code examples
javascriptreactjsyarnpkg

When I want to create react app with yarn its give me this error


yarn : File C:\Users\TECH MOON\AppData\Roaming\npm\yarn.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
+ yarn --v      
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Solution

  • Make sure you install npm and npx, then use create-react-app your app name.

    https://www.npmjs.com/package/npx