【问题标题】:Yarn:- Exit code:1; Command failed, while trying to create yarn app纱线:- 退出代码:1;命令失败,同时尝试创建纱线应用程序
【发布时间】:2022-02-04 06:39:55
【问题描述】:

我正在尝试使用 tailwindcss 创建 next.js 应用,但是当我输入以下命令时:

yarn create next-app -e -tailwindcss demo-app-full

它总是导致错误,即:-

$ yarn create next-app -e -tailwindcss demo-app-full
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-next-app@12.0.10" with binaries:
      - create-next-app
'C:\Users\7386-85615SG' is not recognized as an internal or external command,
operable program or batch file.
error Command failed.
Exit code: 1
Command: C:\Users\7386-85615SG 2913642\AppData\Local\Yarn\bin\create-next-app
Arguments: -e -tailwindcss demo-app-full
Directory: C:\Users\7386-85615SG 2913642\Desktop\HEMANG\Pionauts
Output:

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

为了绕过这个,我做了很多步骤,其中包括

 1.     yarn upgrade
        yarn add yarn
        yarn info

 2. npm install -g npm@latest
    nvm install node
    npm install -g yarn

尝试使用此解决方案中给出的步骤:- Yarn Start Command failed with exit code 1 但这也没有用。

【问题讨论】:

    标签: node.js next.js yarnpkg yarn-workspaces


    【解决方案1】:

    这里的路径很可能是原因C:\Users\7386-85615SG 2913642文件夹名称中的空格显示为问题,这不是一个好主意,请尝试创建一个简单的结构,例如C:\MyProject,然后重试。

    【讨论】:

    • 试过这个,但没用。
    • 当您重命名文件夹并运行时 - 确切的输出是什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-15
    • 2022-01-15
    • 1970-01-01
    • 2017-04-20
    • 2021-10-08
    • 1970-01-01
    • 2020-12-04
    相关资源
    最近更新 更多