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
I have a minimal script that just has a prompt. When I execute it I get an error. The error message is below.
To Reproduce
Create a script that takes no input (just has a prompt). Run it with the "Run" button in the VS Code UI. I get an error message instead of the script running.
Expected behavior
A clear and concise description of what you expected to happen.
Environment
vscode: 1.90.2
extension: 1.42.0
Trace
## test1
<details class="genaiscript">
<summary>
⚙️ configuration
</summary>
- model: openai:gpt-4
- base: https://tnrllmproxy.azurewebsites.net/openai/deployments
- type: azure
- source: env: OPENAI_API_...
</details>
<details class="genaiscript">
<summary>
🤖 automation
</summary>
Use the command line interface [run](https://microsoft.github.io/genaiscript/reference/cli/run/) to automate this task:
```bash
npx --yes genaiscript@^1.42.0 run test1 --apply-edits --model openai:gpt-4
```
- You will need to install [Node.js LTS](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
- The cli uses the same secrets in the `.env` file.
</details>
<details class="genaiscript">
<summary>
💾 script
</summary>
- temperature: 0.8
<details class="genaiscript">
<summary>
🏡 env
</summary>
</details>
<details class="genaiscript">
<summary>
🧬 prompt
</summary>
<details class="genaiscript">
<summary>
📓 script source
</summary>
```js wrap
$`Tell me a joke`
```
</details>
- import: C:\Users\zorn\OneDrive - Microsoft\AI CoArch\RobustPrompt\genaisrc\test1.genai.mjs, parent: c:\Users\zorn\.vscode\extensions\genaiscript.genaiscript-vscode-1.42.0\genaiscript.cjs
- 📦 imported: c:\Users\zorn\OneDrive - Microsoft\AI CoArch\RobustPrompt\genaisrc\test1.genai.mjs
- Error: 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:'
- 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:'
</details>
</details>
<details class="genaiscript">
<summary>
❌ Errors
</summary>
- Error: 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:'
- 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:'
> ```````markdown> 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:239:11)
> at defaultLoad (node:internal/modules/esm/load:130:3)
> at nextLoad (node:internal/modules/esm/hooks:866:28)
> at load (file:///c:/Users/zorn/.vscode/extensions/genaiscript.genaiscript-vscode-1.42.0/node_modules/tsx/dist/esm/index.mjs?1719875985997:2:1768)
> at nextLoad (node:internal/modules/esm/hooks:866:28)
> at Hooks.load (node:internal/modules/esm/hooks:449:26)
> at handleMessage (node:internal/modules/esm/worker:196:24)
> at Immediate.checkForMessages (node:internal/modules/esm/worker:138:28)
> at process.processImmediate (node:internal/timers:478:21)
> ```````
</details>
Extension version: 1.42.0
VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
Item
Value
CPUs
Intel(R) Xeon(R) Silver 4108 CPU @ 1.80GHz (32 x 1796)
The default behavior of the "+" button in the GenAIScript panel is to create a .mjs file (not a .js file). This appears to cause the issue observed above. When I use the same prompt in a .js file the script executes correctly.
Error: 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:'
Good catch. This is a windows issue with the new javascript/typescript loader.
Type: Bug
Describe the issue
I have a minimal script that just has a prompt. When I execute it I get an error. The error message is below.
To Reproduce
Create a script that takes no input (just has a prompt). Run it with the "Run" button in the VS Code UI. I get an error message instead of the script running.
Expected behavior
A clear and concise description of what you expected to happen.
Environment
vscode: 1.90.2
extension: 1.42.0
Trace
Extension version: 1.42.0
VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: