ota-meshi / eslint-plugin-jsonc

ESLint plugin for JSON(C|5)? files
https://ota-meshi.github.io/eslint-plugin-jsonc/
MIT License
183 stars 17 forks source link

Cannot find module `worker.js` #352

Open SheldonWBM opened 2 weeks ago

SheldonWBM commented 2 weeks ago

"eslint": "^9.6.0" "typescript": "5.5.3", "eslint-plugin-jsonc": "^2.16.0" yarn@4.3.1

[Info  - 15:06:30] ESLint library loaded from: 
[my_path]/.yarn/sdks/eslint/lib/api.js
Uncaught exception received.
Error: Cannot find module '[my_path]/.yarn/__virtual__/eslint-plugin-jsonc-virtual-921eb7150c/0/cache/eslint-plugin-jsonc-npm-2.16.0-988161132b-20ca0eff63.zip/node_modules/eslint-plugin-jsonc/dist/utils/get-auto-jsonc-rules-config/worker.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1055:15)
    at Module._load (node:internal/modules/cjs/loader:908:27)
    at c._load (node:electron/js2c/node_init:2:13672)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
    at MessagePort.<anonymous> (node:internal/main/worker_thread:192:26)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20)
    at exports.emitMessage (node:internal/per_context/messageport:23:28)

eslint.config.mjs

import eslintPluginJsonc from 'eslint-plugin-jsonc';

export default [
     ...eslintPluginJsonc.configs['flat/recommended-with-json'],
     rules: {
         'jsonc/sort-keys': 'warn'
     }
]
ota-meshi commented 2 weeks ago

Please share a repository where the issue can be reproduced.

SheldonWBM commented 2 weeks ago

Sharing a repo is not possible at this time. On the weekend, I might create a minimum reproducible repo.

Please share a repository where the issue can be reproduced.