- 41
- 0
问题描述
我想用nuxt官网命令 yarn create nuxt-app <项目名>创建一个前端项目,但是运行该命令的时候报错了,具体报错如下:
...
warning "nuxt-app > firebase > @firebase/performance > @firebase/installations > @firebase/installations-types@0.1.0" has unmet peer dependency "@firebase/app-types@0.x".
[4/4] Building fresh packages...
success Installed "create-nuxt-app@2.9.2" with binaries:
- create-nuxt-app
'C:\Users\win' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error Command failed.
Exit code: 1
Command: C:\Users\win 10\AppData\Local\Yarn\bin\create-nuxt-app
Arguments: officialWebsite.shanglian
Directory: D:\demo\_WebDemo\officialWebsite.shanglian
Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
问题出现的环境背景及自己尝试过哪些方法
我尝试使用网上提供的方法运行yarn global add create nuxt-app这条命令,但是这条命令也报错,
于是我又尝试网上提供的命令运行yarn config set ignore-engines true,然后重新运行yarn global add create nuxt-app不报错。
当我重新运行nuxt官网提供的安装命令 yarn create nuxt-app <项目名>时,有提示让我选择版本具体如下:
D:\demo\_WebDemo\officialWebsite.shanglian>yarn create nuxt-app officialWebsite.shanglian
yarn create v1.17.3
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "vuexblaze@^0.0.3". Ignoring it.
Couldn't find any versions for "vuexblaze" that matches "^0.0.3"
? Please choose a version of "vuexblaze" from this list: (Use arrow keys)
> 0.1.1
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.2
0.0.1
我随便选了一个然后就报错了,具体报错代码如下:
D:\demo\_WebDemo\officialWebsite.shanglian>yarn create nuxt-app officialWebsite.shanglian
yarn create v1.17.3
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "vuexblaze@^0.0.3". Ignoring it.
Couldn't find any versions for "vuexblaze" that matches "^0.0.3"
? Please choose a version of "vuexblaze" from this list: 0.1.1
[2/4] Fetching packages...
info fsevents@2.0.7: The platform "win32" is incompatible with this module.
info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "nuxt-app > nuxt-fire@1.4.1" has incorrect peer dependency "firebase@^6.0.2".
warning "nuxt-app > firebase > @firebase/database@0.3.20" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/firestore@1.2.2" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/functions@0.4.6" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/messaging@0.3.19" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/performance@0.2.1" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/storage@0.2.15" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/auth > @firebase/auth-types@0.6.1" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/auth > @firebase/auth-types@0.6.1" has unmet peer dependency "@firebase/util@0.x".
warning "nuxt-app > firebase > @firebase/database > @firebase/database-types@0.3.11" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/firestore > @firebase/firestore-types@1.2.1" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/functions > @firebase/messaging-types@0.2.11" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/performance > @firebase/installations@0.1.0" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/storage > @firebase/storage-types@0.2.11" has unmet peer dependency "@firebase/app-types@0.x".
warning "nuxt-app > firebase > @firebase/storage > @firebase/storage-types@0.2.11" has unmet peer dependency "@firebase/util@0.x".
warning "nuxt-app > firebase > @firebase/performance > @firebase/installations > @firebase/installations-types@0.1.0" has unmet peer dependency "@firebase/app-types@0.x".
[4/4] Building fresh packages...
success Installed "create-nuxt-app@2.9.2" with binaries:
- create-nuxt-app
'C:\Users\win' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
error Command failed.
Exit code: 1
Command: C:\Users\win 10\AppData\Local\Yarn\bin\create-nuxt-app
Arguments: officialWebsite.shanglian
Directory: D:\demo\_WebDemo\officialWebsite.shanglian
Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
D:\demo\_WebDemo\officialWebsite.shanglian>
你期待的结果是什么?
我希望有朋友帮我找到原因,谢谢!
- 共 0 条
- 全部回答
-
遥看远山 普通会员 1楼
在尝试创建Vue项目并遇到报错时,以下是一些可能的原因和解决方法:
- 安装依赖项:首先确认你已经安装了所有需要的依赖项。如果你使用的是npm,你可以运行以下命令来检查和安装依赖项:
npm list如果你使用的是yarn,你可以运行以下命令来检查和安装依赖项:
yarn list如果依赖项没有安装,你需要使用
npm install或yarn add命令来安装。-
模板文件路径错误:确保你的Vue模板文件路径正确。如果路径错误,Vue会找不到相应的模板文件。你可以检查你的Vue项目的文件夹结构,确保你的Vue模板文件和其它文件在同一目录下。
-
环境问题:确保你的开发环境设置正确。你可以检查你的终端设置,确保你的终端可以访问到npm和yarn。你也可以检查你的服务器设置,确保你的服务器可以正确地处理npm和yarn的命令。
-
系统问题:确保你的系统和操作系统可以运行Vue和yarn。你可以尝试在命令行中运行以下命令来检查你的系统和操作系统:
npm -v yarn -v如果系统或操作系统的问题,你可能需要重新安装Vue或yarn。
-
问题在npm或yarn:如果你使用的是npm或yarn,尝试使用
npm install或yarn add命令来安装,看是否可以解决问题。 -
缺少必要的依赖项:如果你的项目依赖了某些依赖项,但没有安装这些依赖项,你可能需要先安装这些依赖项。你可以使用
npm install或yarn add命令来安装。 -
使用旧版本的Vue或yarn:如果你使用的是旧版本的Vue或yarn,你可能需要更新到最新的版本。你可以使用
npm install或yarn add命令来更新。
希望以上建议能帮助你解决问题。如果问题依然存在,你可能需要寻求更专业的帮助。
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部
