Reactjs 在VS代码中创建react应用程序在Windows上引发未经授权的访问

Reactjs 在VS代码中创建react应用程序在Windows上引发未经授权的访问,reactjs,npm,visual-studio-code,windows-10,create-react-app,Reactjs,Npm,Visual Studio Code,Windows 10,Create React App,当我尝试在我的Windows计算机上创建react应用程序时,我不断获得未经授权的访问权限。我还没有在Mac上体验过这种行为,所以我真的不知道是什么导致了这个问题 在VS代码的终端中,我运行了以下命令: PS C:\Users\Foo_Bar\sandbox> npm install -g create-react-app C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app -> C:\Users\Foo_Bar\AppData

当我尝试在我的Windows计算机上创建react应用程序时,我不断获得未经授权的访问权限。我还没有在Mac上体验过这种行为,所以我真的不知道是什么导致了这个问题

在VS代码的终端中,我运行了以下命令:

PS C:\Users\Foo_Bar\sandbox> npm install -g create-react-app
C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app -> C:\Users\Foo_Bar\AppData\Roaming\npm\node_modules\create-react-app\index.js
added 91 packages from 45 contributors in 6.923s

PS C:\Users\Foo_Bar\sandbox> create-react-app --version 
create-react-app : File C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app.ps1 ca 
nnot 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 --version
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\Foo_Bar\sandbox> create-react-app test-app
create-react-app : File C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app.ps1 ca
nnot 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 test-app
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\Foo_Bar\sandbox> 
看起来npm安装-g create react app成功了。但是,创建实际应用程序或检查版本失败。有人知道可能是什么原因吗

编辑:
Node
npm
版本如下:

PS C:\Users\Foo_Bar\sandbox> node --version
v12.13.0
PS C:\Users\Foo_Bar\sandbox> npm --version
6.12.0
试用

npx create-react-app **foldername**
我也遇到了同样的问题,这是更快更简单的解决方案

尝试使用

npx create-react-app **foldername**

我也有同样的问题,这是更快更简单的解决方案

你读了链接吗?我读了。我遗漏了什么吗?你看过链接了吗?我看过。我遗漏了什么吗?npx v6.14.5在windows 10上无限次暂停。节点v14.3.0和npm v6.14.5.npx v6.14.5在windows 10上无限次停止。节点v14.3.0和npm v6.14.5。