gpt4 book ai didi

vue.js - Nuxtjs包安装babel报错

转载 作者:行者123 更新时间:2023-12-04 14:55:21 25 4
gpt4 key购买 nike

我正在尝试安装 Nuxt-Admin-starter,但每次我遇到这个错误时,我的节点版本是 14.17.1,我要安装的包是: https://github.com/vrwebdesign/nuxt-admin-starter ,

我该如何解决这个问题?

ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\babel-preset-app\src\polyfills-plugin.js:1
Error: C:\Users\a\Desktop\New folder\nuxt-admin-starter\.nuxt\client.js: Cannot find module '@babel/preset-env/lib/utils'
Require stack:
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\babel-preset-app\src\polyfills-plugin.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\babel-preset-app\src\index.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\core\lib\config\files\plugins.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\core\lib\config\files\index.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\core\lib\index.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\babel-loader\lib\index.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\loader-runner\lib\loadLoader.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\loader-runner\lib\LoaderRunner.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\webpack\lib\NormalModule.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\webpack\lib\NormalModuleFactory.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\webpack\lib\Compiler.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\webpack\lib\webpack.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\nuxt.config.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\config\dist\config.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\cli\dist\cli-index.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\cli\dist\cli.js
- C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\typescript-runtime\bin\nuxt-ts.js
at PluginPass.Program (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@nuxt\babel-preset-app\src\polyfills-plugin.js:15:34)
at newFn (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\visitors.js:179:21)
at NodePath._call (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\path\context.js:55:20)
at NodePath.call (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\path\context.js:42:17)
at NodePath.visit (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\path\context.js:90:31)
at TraversalContext.visitQueue (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\context.js:112:16)
at TraversalContext.visitSingle (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\context.js:84:19)
at TraversalContext.visit (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\context.js:140:19)
at Function.traverse.node (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\index.js:84:17)
at traverse (C:\Users\a\Desktop\New folder\nuxt-admin-starter\node_modules\@babel\traverse\lib\index.js:66:12)

最佳答案

给定的 repo 不是 NPM 包,因此您无法安装它。它实际上是一个样板启动器,因此是一个为您提供一些已配置的现有结构的项目,让您可以花更少的时间配置事物等。

成功运行项目的步骤是

[go to a clean "code" directory]
git clone https://github.com/vrwebdesign/nuxt-admin-starter
yarn
[pass the required "RECAPTCHA_SITEKEY" into a `.env` file otherwise it will error]
yarn dev

这应该可以让您访问该项目。
它可以是您的起点,也可以从中获取一些配置,但您将无法使用类似 yarn add nuxt-admin-starter 的方式安装它。

关于vue.js - Nuxtjs包安装babel报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68148786/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com