Skip to content

Programming-Communities/PowerShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

The error indicates that PowerShell's execution policy is preventing the npx command from running. This happens because script execution is disabled or restricted by default on your system.

Steps to Resolve:

  1. Check Current Execution Policy: Run the following command to see your current execution policy:

    Get-ExecutionPolicy

    It might return something like Restricted.

  2. Set Execution Policy to Unrestricted or RemoteSigned: To allow scripts to run, change the execution policy:

    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
    • RemoteSigned allows locally created scripts to run and requires downloaded scripts to be signed by a trusted publisher.
    • If RemoteSigned doesn't work, you can use Unrestricted as a temporary measure:
      Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
  3. Confirm the Change: Verify the new execution policy:

    Get-ExecutionPolicy
  4. Retry the Command: Run your npx create-next-app@latest command again.

Additional Notes:

  • You only need to set this once unless the policy is reset.
  • If you're working in a corporate environment, you might need administrator privileges or approval to change this setting.
  • Avoid setting the execution policy to Unrestricted permanently as it can pose a security risk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published