CodeceptJS fails to load config file on Windows (tried in powershell and git bash):
$ pnpm codeceptjs run
Error: Failed to load config file C:\test\e2e\codecept.conf.js:
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 loadConfigFile (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/config.js:272:15)
at async Config.load (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/config.js:124:16)
at async getConfig (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/command/utils.js:16:12)
at async default (file:///C:/test/ui/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/command/run.js:19:16)
at async Command.<anonymous> (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/bin/codecept.js:40:7)
passing a file URL fails as well:
$ pnpm codeceptjs run -c "file:///C:/test/e2e/codecept.config.js"
Error: Config file C:\test\e2e\file:\C:\test\e2e\codecept.config.js does not exist. Execute 'codeceptjs init' to create config
CodeceptJS fails to load config file on Windows (tried in powershell and git bash):
$ pnpm codeceptjs run Error: Failed to load config file C:\test\e2e\codecept.conf.js: 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 loadConfigFile (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/config.js:272:15) at async Config.load (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/config.js:124:16) at async getConfig (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/command/utils.js:16:12) at async default (file:///C:/test/ui/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/lib/command/run.js:19:16) at async Command.<anonymous> (file:///C:/test/e2e/node_modules/.pnpm/codeceptjs@4.0.2_@types+node@25.9.0/node_modules/codeceptjs/bin/codecept.js:40:7)passing a file URL fails as well:
$ pnpm codeceptjs run -c "file:///C:/test/e2e/codecept.config.js" Error: Config file C:\test\e2e\file:\C:\test\e2e\codecept.config.js does not exist. Execute 'codeceptjs init' to create config