documentationjs / documentation

:book: documentation for modern JavaScript
http://documentation.js.org/
Other
5.78k stars 482 forks source link

[v14] Error occurs when specifying a custom theme. #1634

Open shsatovg opened 3 months ago

shsatovg commented 3 months ago

Description

Error occurs when specifying custom theme on v14 series.

How are you running documentation.js

Node.js API

Version

documentation.js version:v14.0.3 Node.js version: v20.10.0 OS: Windows 10

The current behavior

When I specify the custom theme and run it, I get the following error in the console log.

node:internal/modules/esm/load:236
    throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes);
          ^

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol
'c:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:236:11)
    at defaultLoad (node:internal/modules/esm/load:128:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:409:13)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:56)
    at new ModuleJob (node:internal/modules/esm/module_job:65:26)
    at #createModuleJob (node:internal/modules/esm/loader:303:17)
    at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:260:34)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:241:17)
    at async ModuleLoader.import (node:internal/modules/esm/loader:328:23) {
  code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

The expected behavior

Specify the custom theme and run it to output documentation with the custom theme applied.

input code,output documentation

For all codes that do not depend on the input code, output documentation is not printed and an error is generated in the console. (More information on console errors can be found in "The current behavior".)

Steps To Reproduce