在进行React项目创建时遇到create-react-app无法运行的问题,特此将解决办法记录一下,仅供参考。
问题呈现如图:
解决步骤如下:
1、在电脑应用程序中找到Windos PowerShell
并且以右键管理员身份运行。
2、打开了命令行之后,输入set-ExecutionPolicy RemoteSigned
,并且把权限改权限为A,然后通过 get-ExecutionPolicy
查看当前的状态:
3、继续使用create-react-app
创建项目即可。
问题解决。
注:除此之外可能会遇到@typescript-eslint/eslint-plugin@2.24.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1". Got "11.1.0"
报错问题;
则先执行一下yarn config set ignore-engines true
,再执行create-react-app
创建项目即可。