-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Syncpack version
14.0.2
Operating system(s)
Windows
Steps to reproduce
- Create a repo with a
syncpack.config.cjsconfig file. - Run
npx syncpack lint
package.json
{
"name": "syncpack-windows-repro",
"version": "1.0.0",
"private": true,
"scripts": {
"syncpack": "syncpack lint"
}
}syncpack.config.cjs
module.exports = {
semverGroups: [
{
label: "Dependencies should use caret dependency ranges",
dependencies: ["**"],
dependencyTypes: ["dev", "peer", "prod"],
packages: ["**"],
range: "^",
},
],
};Expected behavior
syncpack reads the config and runs normally.
Actual behavior
Node.js throws when trying to import() a file, I imagine the .cjs config file
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be
valid file:// URLs. Received protocol 'c:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:241:11)
at defaultLoad (node:internal/modules/esm/load:132:3)
at ModuleLoader.load (node:internal/modules/esm/loader:724:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:543:56)
at #createModuleJob (node:internal/modules/esm/loader:567:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:297:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:265:41)
at async ModuleLoader.import (node:internal/modules/esm/loader:605:23)
Code of Conduct
- I agree to follow the Code of Conduct
Reactions are currently unavailable