首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >运行时出错: npx创建-npx创建下一个应用程序-e with-tailwindcss my-project

运行时出错: npx创建-npx创建下一个应用程序-e with-tailwindcss my-project
EN

Stack Overflow用户
提问于 2022-03-27 09:24:36
回答 1查看 493关注 0票数 0

当我尝试创建一个新的Next.js Tailwind 'App‘(使用以下命令:npx create-next-app -e with-tailwindcss my-project)时,我得到以下错误:

代码语言:javascript
运行
复制
C:\socialmedia3>npx create-next-app -e with-tailwindcss socialmedia3
Creating a new Next.js app in C:\socialmedia3\socialmedia3.

Downloading files for example with-tailwindcss. This might take a moment.

Installing packages. This might take a couple of minutes.

Der Befehl "yarn" ist entweder falsch geschrieben oder
konnte nicht gefunden werden. // This is German and means something like: The command "yarn" is either misspelled or could not be found.
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: spawn yarn ENOENT
    at notFoundError (C:\Users\jesse\AppData\Local\npm-cache\_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:100:3828)
    at verifyENOENT (C:\Users\jesse\AppData\Local\npm-cache\_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:100:4207)
    at ChildProcess.e.emit (C:\Users\jesse\AppData\Local\npm-cache\_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:100:4062)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess.e.emit (C:\Users\jesse\AppData\Local\npm-cache\_npx\efeac22998af9bf2\node_modules\create-next-app\dist\index.js:100:4103)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: [ 'install' ]
}

我做错了什么?谨致问候。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-27 09:32:55

您通过npx使用的库似乎需要安装yarn,而不是。

您可以用npm i -g yarn安装它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71635118

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档