node.js - 我在创建 react 应用程序时遇到这样的错误

标签 node.js reactjs create-react-app

-->
create-react-app : File C:\Users\ADMIN\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 demo

最佳答案

我认为您使用的是 Windows,我遇到了同样的问题,这是由于您系统中的安全功能造成的。

  1. 以管理员身份打开 powershell。
  2. 运行以下命令set-executionpolicy remotesigned
  3. 再试一次。

这对我有用。

来源:https://www.faqforge.com/windows/windows-powershell-running-scripts-is-disabled-on-this-system/

关于node.js - 我在创建 react 应用程序时遇到这样的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59561788/

相关文章:

javascript - 使用 create-react-app 和 webpack 开发服务器将客户端 React 应用程序的请求代理到服务器

reactjs - 创建 React App V2 - 多个入口点

node.js - 相当于 ExpectedConditions.or 的 Node ,用于等待多个元素之一

javascript - 如何通过变量将数据插入MySQL数据库?

node.js - 如何使用nodeJS下载保存在gridFS中的文件

reactjs - 如何在我的 React 项目中导入 Flowbite?

node.js - Nginx 中的多个域仅允许 https

reactjs - BrowserRouter 中的 react-router-dom basename 无法正常工作

javascript - 如何在没有唯一键警告的情况下使用 React 渲染 Material UI 网格

reactjs - 从 CRA+TS 应用程序的源代码导入时,Cypress 测试无法运行