Skip to content

eslint error when creating in ReactJS template #2089

@shaibam

Description

@shaibam

Describe the bug

eslint error when creating in ReactJS template.
Create a new project using ReactJS (Typescript) ,
Open the terminal and run 'npm run eslint'
result:
TypeError: Cannot read properties of undefined (reading '0')
at Module.enableCompileCache (node:internal/modules/helpers:177:2181)
at Object.eval (/home/projects/vitejs-vite-kxyiui/node_modules/eslint/bin/eslint.js:13:25)
at Module._compile (node:internal/modules/cjs/loader:160:18351)
at Module._extensions..js (node:internal/modules/cjs/loader:160:19092)
at Module.load (node:internal/modules/cjs/loader:160:16623)
at Module._load (node:internal/modules/cjs/loader:160:14286)
at TracingChannel.traceSync (node:diagnostics_channel:26:3678)
at wrapModuleLoad (node:internal/modules/cjs/loader:160:3949)
at Module.executeUserEntryPoint (node:internal/modules/run_main:179:2179)

Node.js v22.22.0

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-yxwtgfsb?file=package.json,README.md&terminal=dev

Steps to reproduce

  1. Create a new project using ReactJS (Typescript) ,
  2. Open the terminal and run 'npm run eslint'
  3. See Error
    TypeError: Cannot read properties of undefined (reading '0')
    at Module.enableCompileCache (node:internal/modules/helpers:177:2181)
    at Object.eval (/home/projects/vitejs-vite-kxyiui/node_modules/eslint/bin/eslint.js:13:25)
    at Module._compile (node:internal/modules/cjs/loader:160:18351)
    at Module._extensions..js (node:internal/modules/cjs/loader:160:19092)
    at Module.load (node:internal/modules/cjs/loader:160:16623)
    at Module._load (node:internal/modules/cjs/loader:160:14286)
    at TracingChannel.traceSync (node:diagnostics_channel:26:3678)
    at wrapModuleLoad (node:internal/modules/cjs/loader:160:3949)
    at Module.executeUserEntryPoint (node:internal/modules/run_main:179:2179)

Node.js v22.22.0

Expected behavior

should display lint analysis

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 147.0.0.0
Major version = 147
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 70713879,
  "usedJSHeapSize": 60978539,
  "jsHeapSizeLimit": 4294967296
}
Hash = 4c73681d

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions