MCPcopy Index your code
hub / github.com/nodejs/node / throwInvalidSubpath

Function throwInvalidSubpath

lib/internal/modules/esm/resolve.js:329–335  ·  view source on GitHub ↗

* Throws an error indicating that the given request is not a valid subpath match for the specified pattern. * @param {string} request - The request that failed to match the pattern. * @param {string} match - The pattern that the request was compared against. * @param {URL} packageJSONUrl - The UR

(request, match, packageJSONUrl, internal, base)

Source from the content-addressed store, hash-verified

327 * @throws {ERR_INVALID_MODULE_SPECIFIER} When the request is not a valid match for the pattern.
328 */
329function throwInvalidSubpath(request, match, packageJSONUrl, internal, base) {
330 const reason = `request is not a valid match in pattern "${match}" for the "${
331 internal ? 'imports' : 'exports'}" resolution of ${
332 fileURLToPath(packageJSONUrl)}`;
333 throw new ERR_INVALID_MODULE_SPECIFIER(request, reason,
334 base && fileURLToPath(base));
335}
336
337/**
338 * Creates an error object for an invalid package target.

Callers 1

Calls 1

fileURLToPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…