Open
Description
Describe the bug
I'm facing a couple of issues when using Algo Builder to compile contracts on windows machine. I've attached the screenshots as shown below.
- This occurs because the framework uses
python3
command to compile the contracts. I'm currently using anaconda python virtual environment on Windows 10. It usespython
instead.
- This occurs after I've updated the file in
node_modules/@algo-builder/runtime/build/lib/pycompile-op.js
to usepython
instead ofpython3
.
I believe issue 2 is because of the different error numbers used by nodeJS for mac and windows machines. I had to replace the e?.errno === -2
with e?.errno === -4058
on line number 103 so that framework can detect missing generated yaml files and continue the process of compilation. The file is located in /node_modules/@algo-builder/algob/build/lib/compile.js
Possible Solution
- Not sure if there's a way to try running the compilation with
python3
orpython
orpy
. - Maybe we can detect the OS and dynamically change the error number detection accordingly?
Steps to Reproduce
- Run
yarn run algob compile
on a new Algo Builder project on Windows 10.
Environment
- OS: Windows 10, Windows 11
- Node.js version: v16.15.0
- algob version: 3.2.0
- Python: 3.9.12 (using anaconda)
Activity