ERR_UNSUPPORTED_ESM_URL_SCHEME is a Node.js error that appears when the ES module loader is asked to import something using a URL scheme it does not support. In practice, this often happens when an import points to a raw Windows path, an HTTP URL, or a tool-generated specifier that Node cannot resolve as a valid local module.
Node’s native ES module system expects supported specifiers such as relative paths, package names, or properly formed file: URLs. When the import source falls outside those rules, the loader stops before executing your code and reports the unsupported scheme.
As an Amazon Associate I earn from qualifying purchases.
Fixing the error usually means converting paths to valid module specifiers, using pathToFileURL() for local files, configuring TypeScript or loaders correctly, or letting a bundler/runtime handle remote imports instead of passing them directly to Node.
Recommended Free Tools
What ERR_UNSUPPORTED_ESM_URL_SCHEME Means
ERR_UNSUPPORTED_ESM_URL_SCHEME is a Node.js error raised by the ECMAScript module loader when an import resolves to a URL whose scheme Node does not know how to load as a module. In Node’s native ESM implementation, module specifiers are resolved as URLs. Once a specifier has been resolved, Node checks the protocol portion, such as file:, node:, or data:. If the protocol is outside the supported set for the current context, loading stops and this error is thrown.
#1 Best Overall
- Ergonomic Posture Correction: Designed to elevate your laptop to the perfect eye level, this adjustable laptop stand significantly reduces neck, shoulder, and spinal fatigue. Transform your desk into a healthier workstation, ideal for long hours of typing, Zoom meetings, or gaming.
- Unshakable Dual-Rod Stability: Unlike single-hinge models, our stand features a highly engineered dual-support rod mechanism. It perfectly distributes weight to ensure a 100% wobble-free typing experience, safely supporting heavy-duty devices up to 22 lbs (10kg).
- Advanced Thermal Cooling Panel: Maximize your device's performance. The unique geometric heat-vent design on the upper panel provides superior airflow compared to standard solid stands. This continuous heat dissipation prevents your laptop from thermal throttling and hardware damage during intensive tasks.
- Universal 10-16” Compatibility: A versatile computer riser that seamlessly fits all 10 to 16-inch laptops. Broadly compatible with MacBook Pro/Air, Dell XPS, HP, Lenovo, ASUS, Chromebook, and large gaming laptops. The anti-slip silicone pads firmly grip your device and protect it from scratches.
- Foldable, Portable & Ready to Go: Maximize your productivity anywhere. The dual-foldable design allows the stand to collapse completely flat in seconds. Easily slip it into your backpack or briefcase, making it the ultimate portable office accessory for business trips, cafes, or hybrid work setups.
In practical terms, the error often means that the text inside an import statement looks valid to a browser, a bundler, or another runtime, but not to Node’s built-in ESM loader. For example, a browser can import from an https: URL in some environments, and Deno supports remote HTTP imports directly. Node.js does not load arbitrary https: modules natively. If an application contains an import such as import x from "https://example.com/mod.js", Node sees the https: scheme and rejects it with ERR_UNSUPPORTED_ESM_URL_SCHEME.
The same error can appear with local paths when the path is accidentally interpreted as a URL scheme. This is especially common on Windows. A path like C:\project\src\main.js starts with C:, so if it is passed directly into dynamic import() or generated by a custom loader, Node may treat c: as the URL protocol rather than as a drive letter. Native ESM expects local modules to be represented as valid relative specifiers, absolute file: URLs, or package specifiers, not raw platform-specific paths in every situation.
The error message is therefore not saying that ES modules are unsupported. It is saying that the resolved module location uses an unsupported URL protocol. The module may be perfectly valid JavaScript, and the file may exist, but Node refuses to load it because the address format falls outside the schemes handled by its ESM loader.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteCommon supported and unsupported schemes
| Scheme or specifier | Typical status in Node.js ESM | Example |
|---|---|---|
file: |
Supported for local files | file:///home/app/index.mjs |
node: |
Supported for built-in modules | node:fs/promises |
data: |
Supported in limited ESM cases | data:text/javascript,export default 1 |
https: / http: |
Not supported by the default Node.js ESM loader | https://cdn.example.com/lib.js |
c: or another drive-letter-like scheme |
Unsupported when interpreted as a URL protocol | C:\app\index.mjs |
This distinction matters because the fix depends on how the unsupported scheme was introduced. A local file problem usually needs a relative import, a correctly constructed file:// URL, or conversion through utilities such as pathToFileURL(). A remote import problem usually needs a bundler, a download step, a custom loader, or a runtime that supports network imports. A TypeScript or loader setup may need configuration changes so generated imports resolve to formats Node accepts.
Common Causes of the Error
ERR_UNSUPPORTED_ESM_URL_SCHEME usually appears when Node.js receives an ES module specifier that resolves to a URL scheme its default ESM loader does not support. In normal Node.js execution, ES modules are loaded from local files, so supported schemes are mainly file:, with node: available for built-in modules. When a specifier becomes c:, https:, data: in the wrong context, or another unsupported protocol, the loader stops before it even evaluates the imported module.
A frequent cause is using an absolute Windows path directly in an import statement or dynamic import(). For example, a path like C:\project\src\index.js can be interpreted as a URL with the scheme c: instead of as a filesystem path. This often happens in generated code, CLI tools, test runners, custom loaders, or scripts that build an import target with path.resolve() and pass the raw result to import(). Node’s ESM loader expects a proper module specifier or a valid file:// URL, not an unconverted platform-specific path.
Another common source is mixing CommonJS path habits with ESM resolution. In CommonJS, require() accepts many local path strings and resolves them relative to the current file or working directory. ESM is stricter: relative imports need explicit ./ or ../, file extensions are often required, and dynamically imported absolute paths should be converted to file URLs. Code migrated from require() to import() may fail if it keeps passing raw filesystem paths or assumes Node will normalize every path-like string.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Broad Compatibility: Besign LS03 Laptop Mount is compatible with all laptops from 10''-15.6'', such as Air 13, Pro 13 / 15 / 2018 / 2017 / 2016, Lenovo ThinkPad, Dell, HP, ASUS, Chromebook, and other notebooks.
- Ergonomic Design: This LS03 Laptop Stand could elevate your laptop by 6’’ to a perfect viewing level, help you improve your posture and reduce neck and shoulder pain. This laptop stand is super easy to detach and assemble.
- Stable And Protective: This laptop stand is made of premium Aluminum alloy, it is sturdy, support up to 8.8 lbs(4kg), no worry any wobble at all; the rubber on the holder hands sticks tightly, ensure your laptop stable on the stand and prevent any scratches.
- Keep Laptop Cool: the open aluminum design provides good ventilation and airflow to prevent your laptop from overheating. It folds flat if you need to store it, create extra space on your desk and keep your desk clean and organized.
- Easy to Use: thanks to the detachable design, you could assemble it very easily it 3 steps.
Scenarios that commonly trigger it
- Raw Windows absolute paths: passing
C:\app\module.mjsorD:\repo\dist\main.jsintoimport()instead of converting it to afile://URL. - Remote HTTP imports: writing
import "https://example.com/mod.js"in Node.js without a custom loader, runtime support, or bundler transform. Browsers and Deno support this pattern differently; Node does not load arbitraryhttps:modules by default. - Tool-generated specifiers: build tools, code generators, test frameworks, and plugin systems may construct import targets from absolute paths and accidentally hand Node an unsupported scheme.
- TypeScript runtime confusion: running
.tsfiles as ESM without the correct loader can produce bad resolution paths or mismatched output, especially whents-node,tsx, or custom loaders are partially configured. - Incorrect package mode: a project using
"type": "module",.mjs, or ESM-only dependencies may expose imports that previously worked under CommonJS but now go through Node’s stricter ESM URL-based resolver.
Bundler configuration can also be involved. A Vite, Webpack, Rollup, or esbuild setup may accept aliases, virtual modules, remote URLs, or custom prefixes during bundling, but those same specifiers can fail when executed directly by Node. For instance, an alias such as @/utils or a virtual prefix such as virtual:config only works if the bundler or loader rewrites it before Node sees it. If server-side code, tests, or generated output bypass that transform step, Node treats the prefix like a URL scheme and may reject it.
The pattern behind most cases is the same: the specifier looks valid to another environment, tool, or operating system convention, but not to Node’s native ESM loader. Identifying where the import string is created is usually the fastest way to narrow the cause. Check whether the failing value is a local relative path, a raw absolute path, a remote URL, a bundler alias, or a TypeScript-specific module reference before changing package settings or rewriting large parts of the project.
Fixing Local File and Windows Path Imports
For local ES module imports, Node.js expects module specifiers it can resolve as relative paths, package names, or valid file: URLs. The most common fix is to replace absolute operating-system paths with relative imports from the current module. For example, import ./utils.js or ../config/index.js instead of passing a raw path generated elsewhere in your application. In ES modules, include the file extension for local files, because Node does not automatically add .js, .mjs, or .json in the same way many bundlers do.
On Windows, this error often appears when code tries to dynamically import something like C:\project\src\plugin.js. Node interprets the leading C: as a URL scheme, but c: is not a supported ESM loader scheme. Convert Windows paths to proper file: URLs before using import(). The safest approach is to use Node’s built-in URL helpers instead of hand-building strings, because they handle drive letters, backslashes, spaces, and special characters correctly.
Use relative imports when the target is known
If the imported module is part of your source tree and its location is fixed, prefer a normal relative import. This keeps the code portable across macOS, Linux, Windows, CI systems, and containers.
- Good:
import { readConfig } from './config.js'; - Good:
const plugin = await import('../plugins/default.js'); - Avoid:
await import('C:\\app\\plugins\\default.js'); - Avoid:
await import('/Users/me/app/plugins/default.js')when that value is being assembled dynamically and could vary by platform.
Convert absolute paths to file URLs for dynamic imports
When the module path is discovered at runtime, such as loading plugins from a directory, use pathToFileURL() from Node’s url module before calling import(). This produces a valid file:/// URL that the ES module loader understands.
- Use:
import { pathToFileURL } from 'node:url'; - Then:
const mod = await import(pathToFileURL(absolutePath).href);
This is especially useful when paths come from path.resolve(), fs.readdir(), configuration files, command-line arguments, or environment variables. Avoid concatenating 'file://' with a path manually; on Windows it can produce invalid URLs such as file://C:\project\file.js instead of a properly encoded URL like file:///C:/project/file.js.
Rank #3
- 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
- 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
- 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
- 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
- 【Broad Compatibility】:Our desktop book stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.
Build paths relative to the current ES module
In CommonJS, many projects use __dirname to locate nearby files. In ES modules, derive the current file and directory from import.meta.url. Use fileURLToPath() when you need a filesystem path, and use new URL() when you need a URL for importing.
- For filesystem APIs: convert
import.meta.urlto a path, then pass it tofsorpath. - For dynamic imports: create a URL with
new URL('./module.js', import.meta.url)and pass itshreftoimport().
A reliable pattern is await import(new URL('./plugins/example.js', import.meta.url).href). This avoids raw absolute paths entirely and works consistently across platforms. If you are importing JSON or other non-JavaScript assets, also check the Node version and required import attributes, because fixing the URL scheme only addresses how the module is located, not whether that file type is loadable as an ES module.
Handling TypeScript, ts-node, and Loader Configuration
TypeScript adds another layer to ERR_UNSUPPORTED_ESM_URL_SCHEME because Node.js does not execute .ts files directly in normal ESM mode. If an import resolves to a TypeScript source file without a loader that understands TypeScript, Node may fail during resolution or loading. The error is especially common when a tool converts a path incorrectly, passes a Windows drive path as if it were a URL, or mixes CommonJS and ESM settings across package.json, tsconfig.json, and the runtime command.
For native ESM TypeScript execution with ts-node, use the ESM loader rather than the classic CommonJS register hook. A typical command is node --loader ts-node/esm ./src/index.ts. In package.json, set "type": "module" if the project is intended to run as ESM, and in tsconfig.json, use Node-aware module settings such as "module": "NodeNext" and "moduleResolution": "NodeNext". These settings help TypeScript follow the same rules Node uses for ESM resolution, including file extensions and package export maps.
Common configuration combinations
| Scenario | Recommended setup |
|---|---|
| Run TypeScript ESM directly in development | node --loader ts-node/esm ./src/index.ts with "type": "module" and "module": "NodeNext" |
| Run compiled JavaScript in production | Compile with tsc, then run node ./dist/index.js |
| Use CommonJS instead of ESM | Use "module": "CommonJS", omit "type": "module", and avoid ESM-only import patterns |
| Use a faster TypeScript runtime | Use a tool such as tsx or vite-node, while keeping path resolution compatible with Node ESM |
One frequent mistake is importing TypeScript files with paths that work in the compiler but not in Node. For example, TypeScript path aliases such as @/utils/logger are not understood by Node unless a loader, runtime resolver, or bundler rewrites them. If the resolver expands an alias to a malformed absolute path, particularly on Windows, Node can treat the first segment as a URL scheme and throw ERR_UNSUPPORTED_ESM_URL_SCHEME. Prefer relative imports for direct Node execution, or configure alias support consistently in the compiler, test runner, and runtime.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →When using ESM, be precise with extensions. Node expects the emitted JavaScript import graph to be valid, so TypeScript source often imports using the final JavaScript extension, such as import { config } from './config.js', even when the source file is config.ts. With moduleResolution: "NodeNext", TypeScript understands this pattern and maps it during type checking. Avoid relying on extensionless imports unless a bundler or runtime tool explicitly supports them.
- Align runtime and compiler mode: do not combine
"type": "module"with a CommonJS-oriented TypeScript setup unless you have a clear interop plan. - Use the correct loader:
ts-node/registeris for CommonJS-style execution;ts-node/esmis for ESM. - Check generated imports: inspect
distoutput to confirm imports are relative, include valid extensions, and do not contain raw Windows paths. - Keep aliases runtime-aware: configure tools such as
tsconfig-paths,tsx, Jest, Vitest, or your bundler so aliases do not resolve differently in each environment.
If the project does not need live TypeScript execution, the most reliable fix is to compile first and run only JavaScript with Node. This removes custom loaders from the equation and makes URL-scheme problems easier to isolate. For applications that do need loaders, pin compatible versions of Node, TypeScript, and ts-node, then test startup commands on the same operating systems used by the team and deployment pipeline.
Rank #4
- ✔️[Foldabe & Protable] - Foldable laptop stand for desk & Protable computer stand, It combines the advantages of market brackets, convenient travel laptop stand. Easy to use. Suitable for working at home, office and outdoor, improve comfort.
- ✔️[360°Rotation] - The computer stand with 360° rotating base, 360° rotation connected with the base is more flexible, the computer stand allows you to rotate the laptop to any angle.
- ✔️[Stable & Durable] - The Computer stand is made of one-piece fiber metal material, which is more durable and stable than ordinary aluminum alloy computer stands. The upgraded rotating base makes the stand performance more stable, and the non-slip silicone protects the laptop from sliding.Only supports laptops up to 16 inches.
- ✔️[Ergonmic Desing] - You can freely adjust the height and angle of the laptop stand to keep it at eye level, which helps to reduce the pressure on your body while working. Whether sitting or standing, there is a comfortable angle.
- ✔️[Wide Compatibility] - Our laptop stand is compatible with all laptops from 10-16 inches, such as MacBook Air/Pro, Google PixelBook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc. It is an ideal companion for computer workers.
Dealing With Remote URL Imports
Remote imports are a common trigger for ERR_UNSUPPORTED_ESM_URL_SCHEME because the standard Node.js ES module loader does not load modules directly from https: or http: URLs. An import such as import x from "https://cdn.example.com/package/mod.js" may work in Deno, browsers, or some edge runtimes, but it is not supported by default in Node.js. Node’s built-in ESM loader primarily accepts file:, data:, and node: schemes, so a network URL is rejected before the module can be fetched or evaluated.
The safest fix is to replace remote runtime imports with installed package dependencies. If the URL points to a package hosted on a CDN such as esm.sh, Skypack, jsDelivr, or unpkg, install the package from npm and import it by package name instead. For example, instead of importing React, lodash, or nanoid from a CDN URL, add it to package.json and use a normal bare specifier such as import { nanoid } from "nanoid". This keeps dependency resolution, lockfiles, offline installs, integrity checks, and production deployments predictable.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall- Use npm packages for application code: install the dependency with npm, pnpm, or Yarn, then import it normally.
- Use relative or absolute file imports for local modules: download or vendor the module into your project and import it with
./,../, or a validfile:URL. - Use runtime fetch for data, not modules: fetch JSON, text, or API responses with
fetch(), then process the result inside your application. - Avoid mixing runtime assumptions: code written for Deno or browser import maps often needs changes before it can run directly in Node.js.
If you truly need remote module loading in Node.js, use a deliberate mechanism rather than a plain static import. One option is to create a custom ESM loader that recognizes https: URLs, fetches the source, caches it, and returns it to Node’s loader pipeline. This can work for controlled internal tooling, but it adds security and reliability responsibilities: the remote server can change, network access can fail, and downloaded code runs with the permissions of your Node process. Pin exact versions, validate integrity where possible, and avoid loading arbitrary user-controlled URLs.
Bundlers are another common way to handle remote-like imports. In frontend projects, Vite, Webpack, Rollup, or esbuild usually resolve dependencies at build time and output browser-ready assets. If an import URL appears in source code that is meant to be bundled, make sure the file is actually processed by the bundler rather than executed directly by Node. For server-side bundles, configure external dependencies carefully; marking a remote URL as external can leave the unsupported https: import in the final output and cause the same error at runtime.
For CDN-based ESM during development, prefer an import map or bundler configuration only in environments that support it. Browsers can use import maps to map package names to remote URLs, but Node.js will not automatically apply a browser import map to server code. If you share modules between browser and Node targets, keep environment-specific entry points: one that uses npm/package imports for Node, and another that uses CDN or import-map resolution for browser delivery.
A practical migration path is to inspect the failing specifier, identify whether it is code or data, then choose the right replacement. Code should usually become an npm dependency or a vendored local file. Data should usually be loaded with fetch(). Experimental remote module loading should be isolated behind a custom loader or build step, with caching and version pinning in place. That approach removes ERR_UNSUPPORTED_ESM_URL_SCHEME while keeping module loading explicit and repeatable.
Debugging Checklist and Best Practices
When ERR_UNSUPPORTED_ESM_URL_SCHEME appears, start by identifying the exact import that Node.js is trying to resolve. The error is usually caused by a specifier that looks valid to a browser, bundler, shell, or TypeScript toolchain, but not to Node’s native ES module loader. Node.js accepts built-in module specifiers such as node:fs, package names such as lodash, relative paths such as ./utils.js, absolute file: URLs, and in some versions limited data: URLs. It does not load arbitrary schemes such as https:, raw Windows drive paths interpreted as c:, or custom aliases unless a loader or bundler has transformed them first.
Best Value
- 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
- 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
- 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
- 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
- 【Broad Compatibility】:Our printer stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.
Checklist
- Read the full stack trace. Look for the first import path mentioned near the error. Later frames may be consequences of the failed resolution.
- Check the specifier format. Prefer
./module.js,../module.js, package names, orfile:///...URLs. Avoid passing plain absolute Windows paths such asC:\project\src\main.jsinto dynamicimport(). - Convert paths with Node APIs. Use
pathToFileURL()fromnode:urlwhen importing a computed absolute path. This avoids accidental URL schemes likec:on Windows. - Include file extensions for native ESM. In Node.js ES modules,
import './config'may fail whereimport './config.js'succeeds, unless a build step or loader handles extension resolution. - Verify
package.json. Confirm whether the project uses"type": "module"or CommonJS. Mixed module systems can make an import appear to fail for a URL-scheme reason when the real issue is an unexpected runtime path. - Separate runtime imports from bundler-only imports. Aliases like
@/lib/foo, virtual modules, CSS imports, and remote CDN imports often work only after Vite, webpack, Rollup, or another tool rewrites them.
For TypeScript projects, inspect the JavaScript that actually runs, not just the .ts source. A configuration such as "moduleResolution": "bundler" may accept imports that Node cannot execute directly. If you use ts-node, tsx, or a custom loader, confirm that the command includes the expected loader flags and that the Node version supports them. Also check whether emitted files keep the same import specifiers; TypeScript does not automatically rewrite extensionless or aliased paths in many common configurations.
Remote imports need a deliberate strategy. If source code contains import 'https://cdn.example.com/pkg/mod.js', Node’s default loader will reject it. Use a runtime that supports network imports, enable an experimental feature only if it fits your deployment constraints, or replace the remote import with an installed npm package. In server applications, pin package versions and avoid fetching executable code at startup unless your security and availability model explicitly allows it.
Best Practices
- Use relative imports for local files and keep them portable across operating systems.
- Use
file:URLs for dynamic absolute imports, especially in cross-platform CLIs and build tools. - Keep Node, TypeScript, and bundler resolution rules aligned so code that passes development checks also runs in production.
- Avoid relying on editor auto-imports blindly. Auto-imports can insert absolute paths, aliases, or extensionless specifiers that your runtime does not support.
- Test on Windows and POSIX environments if your package is distributed publicly or used in CI/CD pipelines with mixed operating systems.
A reliable fix usually comes down to making the import specifier explicit and compatible with the runtime that executes it. Once local paths, generated JavaScript, loader configuration, and bundler rewrites are all checked against Node’s ESM rules, ERR_UNSUPPORTED_ESM_URL_SCHEME becomes much easier to isolate and prevent.
Frequently Asked Questions
What does ERR_UNSUPPORTED_ESM_URL_SCHEME mean in Node.js?
ERR_UNSUPPORTED_ESM_URL_SCHEME means Node.js tried to load an ES module from a URL scheme it does not support. By default, Node’s ESM loader supports schemes such as file:, data:, and node:, but not arbitrary schemes like https: or malformed Windows paths. The fix is usually to convert the import target into a valid local file URL, use a supported loader, or fetch/build the dependency another way.
How do I fix this error when importing a Windows path?
Use a proper file:// URL instead of importing a raw Windows path like C:\project\file.js. In Node.js, convert paths with pathToFileURL() from the node:url module before passing them to dynamic import(). This avoids Node interpreting the drive letter, such as C:, as an unsupported URL scheme.
Can Node.js import ES modules directly from HTTPS URLs?
Standard Node.js does not import ES modules directly from https:// URLs unless you are using an experimental or custom loader that supports it. For most projects, install the package locally with npm, download the file during a build step, or use a bundler that can resolve remote modules. If you need runtime remote imports, you must explicitly configure a loader and accept the security and caching implications.
Does this error mean my TypeScript configuration is wrong?
It can, especially if TypeScript, ts-node, or a loader is emitting or resolving imports into unsupported paths or URL formats. Check that your tsconfig.json module settings match your runtime, such as NodeNext or ESNext, and that you are using the correct ts-node ESM loader when running TypeScript directly. Also make sure your imports include valid extensions when required by Node’s ESM resolution rules.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →What should I check first when ERR_UNSUPPORTED_ESM_URL_SCHEME appears?
Look at the exact import value shown in the stack trace and identify whether it starts with an unsupported scheme such as https:, a Windows drive letter, or another non-file protocol. Confirm whether the import should be a relative path, an absolute file URL, a package import, or something handled by a bundler. If the code works in a browser or bundler but fails in Node, move that resolution step into your build process or configure an appropriate Node loader.
Bottom Line
ERR_UNSUPPORTED_ESM_URL_SCHEME means Node.js tried to load an ES module from a URL scheme it does not support, most often because a path was written like a URL, a Windows drive path was imported directly, or a remote import was attempted without the right tooling. The fix is usually to use valid relative paths, convert filesystem paths to file:// URLs when needed, or let a bundler/runtime designed for remote modules handle non-file imports.
Start by checking the exact import string that triggered the error, then match the fix to the scenario: normalize local and Windows paths, align TypeScript output with Node’s ESM rules, configure your bundler correctly, or replace remote URLs with installed packages or a supported loader. Once imports use schemes Node understands, the module should load cleanly.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.




