Skip to content

After update to 0.28.2, run asbuild fail with error: ReferenceError: fetch is not defined #2929

@leeho0108

Description

@leeho0108

Bug description

env:
node: v22.16.0
assemblyscript: 0.28.2

asbuild fail with blow error:

ReferenceError: fetch is not defined
at (/{PATH_TO_PROJECT}/node_modules/assemblyscript/node_modules/as-float/index.js:3:45)

I use 0.27.36 before upgrade, and everything just work fine.

Steps to reproduce

reproduce step:
1.create empty project
2.run: npm init
3.run: npm i --save-dev [email protected]
4.run: npx asconfig .
5.open pacakge.json, mouse hover on scripts/asbuild, then click "Run Script" button on popup.
6.build fail with error

7.if open a terminal, then manual input "npm run asbuild",then press entry, this way will build success...

AssemblyScript version

v0.28.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions