简体   繁体   中英

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

  ╭───────────────────────────────────────╮                                                                                     
  │                                       │                                                                                     
  │   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. You can just install it for a specific project. Run npx create-nuxt-app. in a folder and then run npm run dev

I think this issue actually occurs with Node version 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.

Happy Coding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM