Yarn:文件名、目录名或卷标语法不正确

Yarn: The filename, directory name, or volume label syntax is incorrect

我正在尝试遵循 https://codeburst.io/create-a-static-site-in-15-minutes-or-less-using-vue-js-e4e2a9945ee6。一些命令似乎已过时。我在 win 10 上使用 git-bash。我正在使用便携式闪存驱动器。我使用以下方法安装了 yarn:

npm install -g yarn

然后我做了:

    $ yarn create nuxt-app nuxt1
    yarn create v1.12.3
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info fsevents@1.2.4: The platform "win32" is incompatible with this module.
    info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    warning "@vue/cli > @vue/cli-ui > graphql-tag@2.10.0" has unmet peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 ||
    ^0.12.0 || ^0.13.0 || ^14.0.0".
    warning "@vue/cli > @vue/cli-ui > graphql-type-json@0.2.1" has unmet peer dependency "graphql@>=0.8.0".
    [4/4] Building fresh packages...
    success Installed "create-nuxt-app@2.1.1" with binaries:
          - create-nuxt-app
    The filename, directory name, or volume label syntax is incorrect.
    error Command failed.
    Exit code: 1
    Command: E:\nodejs\bin\create-nuxt-app
    Arguments: nuxt1
    Directory: E:\ENVS\js
    Output:

我在我的 E:\ENVS\js 文件夹中没有看到 nuxt 应用程序。我该如何解决这个问题?

当您安装 NodeJS 时,此问题来自 Windows,而不是通过 nvm

这只是我对这个案例的猜测。

请尝试将 create-nuxt-app 安装为全局

npm install -g create-nuxt-app

并通过

E:\ENVS\js创建你的项目

create-nuxt-app nuxt1

希望这可以帮助您和其他会员解决这个问题。 xD