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

Function importNotDefined

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

* Returns an error object indicating that the specified import is not defined. * @param {string} specifier - The import specifier that is not defined. * @param {URL} packageJSONUrl - The URL of the package.json file, or null if not available. * @param {string | URL | undefined} base - The base UR

(specifier, packageJSONUrl, base)

Source from the content-addressed store, hash-verified

299 * @returns {ERR_PACKAGE_IMPORT_NOT_DEFINED} - The error object.
300 */
301function importNotDefined(specifier, packageJSONUrl, base) {
302 return new ERR_PACKAGE_IMPORT_NOT_DEFINED(
303 specifier, packageJSONUrl && fileURLToPath(new URL('.', packageJSONUrl)),
304 fileURLToPath(base));
305}
306
307/**
308 * Returns an error object indicating that the specified subpath was not exported by the package.

Callers 1

packageImportsResolveFunction · 0.85

Calls 1

fileURLToPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…