You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
#8
Closed
binary64 opened this issue
Dec 17, 2021
· 2 comments
On Windows, in an Nx repo, using pnpm, I get this error:
$ pnpm esrun tools/test.ts
node:internal/errors:464
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:371:5)
at defaultResolve (node:internal/modules/esm/resolve:1016:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
tools/test.ts:-
import*asRfrom'rambda'console.log(R.add(2,5))
If I do ts-node tools/test.ts, it works as expected:
$ pnpm ts-node tools/test.ts
7
I am using:
Windows 👎
"@digitak/esrun": "^3.1.0"
pnpm
nx.dev
$ node -v
v16.13.0
The text was updated successfully, but these errors were encountered:
On Windows, in an Nx repo, using pnpm, I get this error:
tools/test.ts:-
If I do
ts-node tools/test.ts
, it works as expected:I am using:
"@digitak/esrun": "^3.1.0"
$ node -v
v16.13.0
The text was updated successfully, but these errors were encountered: