withNuxt is not a function
edimitchel opened this issue · 1 comments
edimitchel commented
Environment
- Operating System: Darwin
- Node Version: v20.11.1
- Nuxt Version: 3.11.1
- CLI Version: 3.11.0
- Nitro Version: 2.9.4
- Package Manager: npm@10.2.4
- Builder: -
- User Config: devtools, modules
- Runtime Modules: @nuxt/eslint@0.3.0-alpha.0
- Build Modules: -
Package
@nuxt/eslint
Reproduction
Describe the bug
I don't know if it's intended but by trying the version alpha 0.3.0, ESLint is complaining about withNuxt is not a function.
By looking in the code from .nuxt/eslint.config.mjs
, it seems totally right, what is exported from this file is an array, not a function at all.
import createConfigForNuxt from '@nuxt/eslint-config/flat';
export default [
...createConfigForNuxt(
This is fixable by using withNuxt
without braces.
Additional context
Reproductible on local by downloading the stackblitz project.
Logs
TypeError: withNuxt is not a function
at ../nuxt-starter-in9jep/eslint.config.js?mtime=1710966190000:4:16
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
edimitchel commented
This issue occurs by using the wrong version of the module (alpha instead of beta).
It works fine on beta channel