-
-
Notifications
You must be signed in to change notification settings - Fork 670
After update to 0.28.2, run asbuild fail with error: ReferenceError: fetch is not defined #2929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You're saying it works when you use a terminal? If that's the case, I think VSCode is running the script with the wrong Node version... |
I tried to repro this, without success. It worked in all cases. I tried on both MacOS and Windows, and Node 18, 20, and 22. Also in the repro on step 4, did you mean |
It should fail for anything below Node 18.1.0, and the @leeho0108 Are you using a Node version manager like |
I am using nvm for node.
and rerun scripts, it prints the right version: "v22.16.0" It's my bad, it is not as's bug, sorry for this Thank you, guys. |
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
The text was updated successfully, but these errors were encountered: