【发布时间】:2019-01-26 13:56:50
【问题描述】:
运行“yarn create react-app app”时出现以下错误
我知道这是因为我的系统用户名中存在空格。如何运行此命令,这样我就不必更改我的系统用户名
success Installed "create-react-app@2.1.3" with binaries:
- create-react-app
[################################################################]
64/64'C:\Users\ted' is not recognized as an internal or external command,
operable program or batch file.
error Command failed.
Exit code: 1
Command: C:\Users\ted mosby\AppData\Local\Yarn\bin\create-react-app
Arguments: app
Directory: D:\Projects\react
我在上述目录中找不到应用程序
【问题讨论】:
-
如果您创建的应用程序则使用
create-react-app <appName>而不是yarn create react-app <appName> -
向 yarn 提交错误报告。 2019 年确实应该支持带空格的用户名...顺便说一句,
yarn create react-app app是正确的语法。 -
npm init react-app app工作吗?