Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creat react app script not working in vscode #9309

Open
madilraza opened this issue Jul 15, 2020 · 12 comments
Open

Creat react app script not working in vscode #9309

madilraza opened this issue Jul 15, 2020 · 12 comments

Comments

@madilraza
Copy link

PS E:\jitsi\MERN> create-react-app MERN
create-react-app : File C:\Users\marsec developer\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.com/fwlink/?LinkID=135170.
At line:1 char:1

  • create-react-app MERN
    • CategoryInfo : SecurityError: (:) [], PSSecurityException
    • FullyQualifiedErrorId : UnauthorizedAccess
      PS E:\jitsi\MERN> create-react-app mern
      create-react-app : File C:\Users\marsec developer\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.com/fwlink/?LinkID=135170.
      At line:1 char:1
  • create-react-app mern
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    

PS E:\jitsi\MERN> create-react-app
create-react-app : File C:\Users\marsec developer\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.com/fwlink/?LinkID=135170.
At line:1 char:1

  • create-react-app
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
    

If you're looking for general information on using React, the React docs have a list of resources: https://reactjs.org/community/support.html

If you've discovered a bug or would like to propose a change please use one of the other issue templates.

Thanks!

@eddiemonge
Copy link
Contributor

Did you globally install CRA? The recommendation is to use npx to run it npx create-react-app MERN.

Also, I'd recommend WSL2 as its a much better developer experience, at least to me it is

@HemanthDavuluri
Copy link

use npx create-react-app yourappname

@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Aug 16, 2020
@madilraza
Copy link
Author

still not able to install with npx

@stale stale bot removed the stale label Aug 16, 2020
@HemanthDavuluri
Copy link

The problem is not with the npx it is with your system . the error says "cannot be loaded because running scripts is disabled" . so i suggest you to go through these kinda articles https://stackoverflow.com/questions/56199111/visual-studio-code-cmd-error-cannot-be-loaded-because-running-scripts-is-disabl

@madilraza
Copy link
Author

thanks man for your guidance i got the answer and you all guys are amazing helped me alot

@dunq10041996
Copy link

use npx create-react-app yourappname

was successful. Thank you

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 25, 2020
@chaurasiawadh
Copy link

I solved this using the following command.

npm uninstall -g create-react-app

npm cache clean --force

then

npx create-react-app project_name --template all

Thanks for this! Worked for me too.

@aghar-saif-eddine
Copy link

Open powershell as an administrator.
Run the following command set-executionpolicy remotesigned

This worked for me.

@amJayem
Copy link

amJayem commented May 20, 2021

The problem is not with the npx it is with your system . the error says "cannot be loaded because running scripts is disabled" . so i suggest you to go through these kinda articles https://stackoverflow.com/questions/56199111/visual-studio-code-cmd-error-cannot-be-loaded-because-running-scripts-is-disabl

By adding the line: "terminal.integrated.defaultProfile.windows": "PowerShell", on the JSON file in setting, I recovered my problem like:
create-react-app mern

  • CategoryInfo : SecurityError: (:) [], PSSecurityException
  • FullyQualifiedErrorId : UnauthorizedAccess

Thanks a lot.

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants