Skip to content

fetch is not defined #676

@toohandsome

Description

@toohandsome

Describe the issue

when i select flash , it will show a error

using serial port COM3 at 1500000
esptool: C:\Users\Administrator\.espressif\python_env\idf5.1_py3.11_env\Scripts\esptool.py
fetch https://github.com/microsoft/devicescript-esp32/releases/latest/download/devicescript-esp32c3-esp32c3_bare-0x0.bin
F:\esp32\node_modules\@devicescript\cli\built\devicescript-cli.cjs:490875
    const resp = await fetch(dlUrl);
                 ^

ReferenceError: fetch is not defined
    at fetchFW (F:\esp32\node_modules\@devicescript\cli\built\devicescript-cli.cjs:490875:18)
    at async flashESP32 (F:\esp32\node_modules\@devicescript\cli\built\devicescript-cli.cjs:490730:21)

Environment

vscode: 1.85.1
extension: 2.15.23
devsVersion: v2.15.23
runtimeVersion: v2.15.23
nodeVersion: v16.17.0

Sources

  • src/main.ts}
import * as ds from "@devicescript/core"

setInterval(async () => {
    console.log(":)")
}, 1000)

Devices

interaction_mode: 0
auto_connect: false
reset_in: false
last_reset_in_time: 0
transport:
web: connected
device:
id: VX12 (0xca7adf6c60073afc)
product: ? (0x?)
firmware_version:
uptime:
stats: announce 461, drop 0, restart 0
services:
infrastructure (0x1e1589eb)
proxy (0x16f19949)

Screenshots
recording

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions