Custom config.ts is not being loaded on Windows/IntelliJ
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 10
- Continue: 0.0.64 (also tried 0.0.67)
- IDE: WebStorm / IntelliJ
- Model: -
- config.json:
-
Description
Trying to add some custom context providers via config.ts, but it does not have any effect.
Looking at the place where the loading happens it can be seen that there is no fallback, config is simply ignored if any error: https://github.com/continuedev/continue/blob/ee50108b64e63d4c500e7803d12f76ef155c33de/core/config/load.ts#L600
Google told me that the common way to fix this kind of error is to rename .js file to .cjs. (but maybe not, since the error is about file:// schema, not the extension)
To reproduce
- Modify
config.ts:
export function modifyConfig(config: Config): Config {
console.log('Test from config.ts');
return config;
}
- Start extension on Windows/IntelliJ
Expected: Test from config.ts in the logs
Got: Error loading config.ts
Log output
[2024-09-03T06:54:31] [info] Starting Continue core...
[2024-09-03T06:54:31] Setup
[2024-09-03T06:54:31] Core started
[2024-09-03T06:54:32] Error loading config.ts: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Same issue here.
- OS: Windows 11 Pro
- Continue: 0.0.64
- IDE: IntelliJ 2024.2.1
Log
[2024-09-04T12:05:57] [info] Starting Continue core...
[2024-09-04T12:05:57] Setup
[2024-09-04T12:05:57] Core started
[2024-09-04T12:05:58] Error loading config.ts: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Same issue. It seems like 3 weeks ago it was working.
Same issue, custom slash commands were not loaded.
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!
config.ts script isn't picked up by the plugin for me as well.