fix: fixed ES Module loading with abolute path fails on windows #430
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed error on windows
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data 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:399:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
at defaultResolve (node:internal/modules/esm/resolve:1135:3)
at nextResolve (node:internal/modules/esm/loader:163:28)
at defer (C:\Projetos\cubos\api-typescript-sdkgen-kysely\node_modules.pnpm\ts-node@10.9.1_@swc+core@1.3.49_@types[email protected][email protected]\node_modules\ts-node\src\esm.ts:159:23)
at entrypointFallback (C:\Projetos\cubos\api-typescript-sdkgen-kysely\node_modules.pnpm\ts-node@10.9.1_@swc+core@1.3.49_@types[email protected][email protected]\node_modules\ts-node\src\esm.ts:168:34)
at C:\Projetos\cubos\api-typescript-sdkgen-kysely\node_modules.pnpm\ts-node@10.9.1_@swc+core@1.3.49_@types[email protected][email protected]\node_modules\ts-node\src\esm.ts:202:16
at addShortCircuitFlag (C:\Projetos\cubos\api-typescript-sdkgen-kysely\node_modules.pnpm\ts-node@10.9.1_@swc+core@1.3.49_@types[email protected][email protected]\node_modules\ts-node\src\esm.ts:409:21)
at resolve (C:\Projetos\cubos\api-typescript-sdkgen-kysely\node_modules.pnpm\ts-node@10.9.1_@swc+core@1.3.49_@types[email protected][email protected]\node_modules\ts-node\src\esm.ts:197:12)
at nextResolve (node:internal/modules/esm/loader:163:28)