nuxt-modules / eslint

ESLint module for Nuxt.js
MIT License
159 stars 15 forks source link

ERROR [unhandledRejection] #88

Closed 42savage closed 1 year ago

42savage commented 1 year ago

Hi, So today i wanted to learn nuxt3. I started with totally basic configurating. At first place I wanted to install eslint. I installed it just like it is in the tutorial.

npm install -D eslint

and then

npm install -D @nuxtjs/eslint-module

and finally nuxt.config.ts

export default {
  modules: [
    // Simple usage
    '@nuxtjs/eslint-module',
  ]
}

This results with error

                                                                                                                                                         12:15:08  

Nuxi 3.3.2 12:15:08
Nuxt 3.3.2 with Nitro 2.3.2 12:15:08 12:15:11

Local: http://localhost:3000/ Network: http://192.168.0.102:3000/ 12:15:08
Network: http://192.168.238.1:3000/ Network: http://192.168.64.1:3000/

ERROR Cannot start nuxt: Cannot find module 'ajv/dist/compile/codegen' 12:15:11 Require stack:

tillschiffer commented 1 year ago

I also had this problem.

npm install --save-dev ajv

This has temporarily solved it for me, but I would prefer a fix in this module without installing additional packages.

42savage commented 1 year ago

I was trying to install ajv-keywords manually, but it didn't resolve my problem so i removed it. Finally upgrading node version to 18 helped, but eslint now is asking for its configuration. In nuxt2 it was provided by default, now it looks like I have to do it on my own. Is that right?

ricardogobbosouza commented 1 year ago

It was always necessary to configure eslint, both in nuxt 2 and in nuxt3