oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.9k stars 231 forks source link

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension On Install #3592

Closed sebash1992 closed 2 months ago

sebash1992 commented 4 months ago

Describe the bug When Running the install command having an error that abort installation

To Reproduce Steps to reproduce the behavior:

  1. Go to you repository root directory
  2. run npx mega-linter-runner --install
  3. You will see the following error `C:\Users\Admin\AppData\Local\npm-cache_npx\614e542633a698fb\node_modules\mega-linter-runner\generators\mega-linter node:internal/errors:496 ErrorCaptureStackTrace(err); ^

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for C:\Users\Admin at new NodeError (node:internal/errors:405:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11) at defaultGetFormat (node:internal/modules/esm/get_format:124:36) at defaultLoad (node:internal/modules/esm/load:84:20) at nextLoad (node:internal/modules/esm/loader:163:28) at ESMLoader.load (node:internal/modules/esm/loader:603:26) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22) at new ModuleJob (node:internal/modules/esm/module_job:64:26) at #createModuleJob (node:internal/modules/esm/loader:480:17) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }

Node.js v18.17.1`

Expected behavior Installation start

Screenshots image

Additional context Run on windows 11 pro

nvuillam commented 4 months ago

@sebash1992 I just tried with node v18.18.2 and no issue :/

Please can you try to upgrade your node.js version and try again ?

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.