简体   繁体   English

安装 NuxtJs 时出现错误

[英]I am getting errors while installing NuxtJs

I have been trying to install NuxtJs in my system installed and updated npm/npx still getting errors this is my error log i successfully installed Nuxt but i am getting erros while launching the app ie when i type npm run dev i get these following errors我一直在尝试在我的系统中安装 NuxtJs 安装和更新的 npm/npx 仍然出现错误这是我的错误日志我成功安装了 Nuxt 但我在启动应用程序时遇到错误,即当我输入npm run dev我得到以下错误

  ╭───────────────────────────────────────╮                                                                                     
  │                                       │                                                                                     
  │   Nuxt.js @ v2.13.3                   │                                                                                     
  │                                       │                                                                                     
  │   ▸ Environment: development          │                                                                                     
  │   ▸ Rendering:   server-side          │                                                                                     
  │   ▸ Target:      server               │                                                                                     
  │                                       │                                                                                     
  │   Listening: http://localhost:3000/   │                                                                                     
  │                                       │                                                                                     
  ╰───────────────────────────────────────╯                                                                                     
                                                                                                                                
 Preparing project for development                                                                                              
 Initial build may take a while                                                                                                 
 Builder initialized                                                                                                            
 Nuxt files generated                                                                                                           
                                                                                                                                
ERROR  Package exports for 'C:\Work\Projects\Appclust-SEO\Nuxt\node_modules\colorette' do not define a valid '.' target         
                                                                                                                                
 at resolveExportsTarget (internal/modules/cjs/loader.js:545:13)                                                                
 at applyExports (internal/modules/cjs/loader.js:459:14)                                                                        
 at resolveExports (internal/modules/cjs/loader.js:508:12)                                                                      
 at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)                                                           
 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)                                                    
 at Function.Module._load (internal/modules/cjs/loader.js:785:27)                                                               
 at Module.require (internal/modules/cjs/loader.js:956:19)                                                                      
 at require (internal/modules/cjs/helpers.js:74:18)                                                                             
 at Object.<anonymous> (node_modules\autoprefixer\lib\autoprefixer.js:5:17)                                                     
 at Module._compile (internal/modules/cjs/loader.js:1063:30)                                                                    
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1103:10)                                                      
 at Module.load (internal/modules/cjs/loader.js:914:32)                                                                         
 at Function.Module._load (internal/modules/cjs/loader.js:822:14)                                                               
 at Module.require (internal/modules/cjs/loader.js:956:19)                                                                      
 at require (internal/modules/cjs/helpers.js:74:18)                                                                             
 at Object.<anonymous> (node_modules\postcss-preset-env\index.js:5:36)                                                          
                                                                                                                                

I can still access the app but with these errors what am i doing wrong???我仍然可以访问该应用程序,但出现这些错误我做错了什么???

I think you can't install nuxt in your system.我认为您无法在系统中安装nuxt。 You can just install it for a specific project.您可以为特定项目安装它。 Run npx create-nuxt-app.运行npx create-nuxt-app。 in a folder and then run npm run dev在一个文件夹中,然后运行npm run dev

I think this issue actually occurs with Node version 13.0.1.我认为这个问题实际上发生在 Node 版本 13.0.1 上。 check your node version, if it same with this, try installing the latest node which is v14.15.4.I hope this fix your Issue.检查您的节点版本,如果与此相同,请尝试安装最新的节点,即 v14.15.4。我希望这能解决您的问题。

Happy Coding.快乐编码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我在使用 `npm` 安装东西时会出错? - Why am I getting errors while installing things using `npm`? 我正在从 Bitbucket 克隆存储库,但在安装依赖项时遇到这些错误 - I am cloning a repository from Bitbucket but getting these errors while installing dependencies 安装ionic时出现这些错误 - I'm getting these errors while installing ionic 在OSX上安装Node时遇到这些错误,我缺少什么? - What am I missing when getting these errors installing Node on OSX? 我正在 Visual Studio 代码中安装聚合物,但有很多错误我收到了很多错误 - I am installing polymer in visual studio code but there are many errors I am getting a lot of errors 在Windows 7上安装节点模块时出现错误 - I am getting error while installing node modules on windows 7 为什么我在安装节点 js 时收到此错误 - why i am getting this error while installing node js 安装 node-sass 时出错 - Getting errors while installing node-sass 为什么我在安装 create-react-app 时收到错误“没有可用于未定义的有效版本” - Why am I getting error "No valid versions available for undefined" while installing create-react-app 安装反应导航时出现 npm 错误。 有人知道这个问题吗? - I am getting npm error while installing react navigation. Do anyone know about this issue?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM