【问题标题】:Yarn always ends in error when i use create command当我使用 create 命令时,纱线总是以错误结束
【发布时间】:2021-10-07 07:31:11
【问题描述】:

每次我尝试使用 yarn 运行 create 命令时都会遇到同样的错误,例如 create-react-app:

PS M:\Users\Michael\Documents\GitHub\test> yarn create react-app test-app --template typescript
yarn create v1.22.11
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@4.0.3" with binaries:
      - create-react-app
The filename, directory name, or volume label syntax is incorrect.
error Command failed.
Exit code: 1
Command: M:\Users\Michael\Documents\GitHub\test\!\bin\create-react-app
Arguments: test-app --template typescript
Directory: M:\Users\Michael\Documents\GitHub\test
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

也许我需要一些环境变量?

【问题讨论】:

    标签: create-react-app yarnpkg


    【解决方案1】:

    此错误来自 Windows。

    我通过全局安装 create-react-app 来修复它,并使用它来创建应用程序而不是 npx。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-14
      • 2018-06-06
      • 1970-01-01
      • 2019-06-20
      • 1970-01-01
      • 2014-10-24
      • 2018-11-26
      相关资源
      最近更新 更多