安装 @nuxtjs/apollo 时的 NPM 警告

NPM warnings when installing @nuxtjs/apollo

我对 terminals/CMD 不是很有信心,我在通过 npx create-nuxt-app 设置 Nuxt 项目后尝试安装 Nuxt 的 Apollo 模块。当我这样做时,通过我的 Nuxt 目录中的 npm install @nuxtjs/apollo@latest,我得到以下 gumf:

npm WARN tailwindcss@2.2.2 requires a peer of autoprefixer@^10.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN vue-cli-plugin-apollo@0.22.2 requires a peer of @vue/cli-shared-utils@^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN apollo-link-persisted-queries@0.2.2 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-node@8.10.2 requires a peer of typescript@>=2.7 but none is installed. You must install peer dependencies yourself.
npm WARN @apollographql/graphql-language-service-interface@2.0.2 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @apollographql/graphql-language-service-utils@2.0.2 requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @apollographql/graphql-language-service-types@2.0.2 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @apollographql/graphql-language-service-parser@2.0.2 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

我不知道这是否重要。然后它邀请我去 运行 npm audit fix,我做了,然后它告诉我它能够修复 15 个问题中的 0 个并且它们需要手动修复。

我做错了什么?

如果您是:

  • 对 CLI 命令没有信心
  • 使用 NPM 而不是纱线(仔细检查您的项目中没有任何 yarn.lock
  • 没有任何严重问题

然后您就可以安全地进行了。在这里,您只有警告,这是 JS 世界中的日常工作。没什么好担心的。

此外,如果您能够 运行 在控制台(浏览器和 CLI)中没有出现任何错误的项目,您就可以开始了!