-
Notifications
You must be signed in to change notification settings - Fork 569
gopherjs build error on Windows #875
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
Running on Windows requires a bit of a hack. From the README:
So, try GOOS=linux gopherjs build filename.go |
What a non-sense. Can you just fix that? |
I added GOOS=linux to my system environment variables and the restarted VSC and then ran gopherjs build filename.go and it worked!! |
Although now suddenly after making those changes I have now tried go run filename.go fails to compile go files with error exec: "C:\Users\me\AppData\Local\Temp\go-build012283026\b001\exe\filename": file does not exist I have not seen this error until now and assume that it must be related to the changes that have occurred . I assume that some how these few changes have now confused Go and caused the problems has this happened to anyone else, and yet again I am stuck. removing the added GOOS=linux variable from my system variables allows go run to work correctly again. Is there not a solution where i can have both Go and Gopherjs working at the same time or is it so extreme that i will have to wait for some one out there to make gopherjs compatible with windows or worse resort to changing my operating system !! |
Don't set GOOS system wide, only set it for that session. I think the command is set GOOS=linux
gopherjs build filename.go but it might be This has been working this way (or broken this way, if you like) for a while. I think if the maintainers were going to fix it, they would have. |
@EchoofthePast do not add |
using set GOOS=linux works its the correct command and works to build the files. |
I hit the same issue in the past. I think it can be mitigated. I don't know if have any side-effect, I didn't test it in all cases, but for simply Just include this 4 lines at
Showing a message for the use is good, in my option, so this change is noticible and not silent. |
Thank you to everyone. |
I am using windows 7 for my operating system and have the most up to date version of Go at the moment version 1.11.1.
I have just recently reinstalled all the packages hoping that it would rectify my problem but has not
My problem seems to be consistent and no solution exists that i can find, I have searched extensively and have found that others are having similar problems and the solutions have not corrected my problem.
I am trying to transpile a gopherjs file. when i run gopherjs build filename.go I receive an error in terminal
β[31m/src/syscall/syscall_nonlinux.go:5:18: undeclared name: SYS_EXIT
β[39mβ[31m/src/syscall/syscall.go:53:39: too few arguments in call to Syscall
β[39m
The first problem that i see with this is that the syscall_nonlinux.go file doesn't even exist in the go root directory and the second error denotes a function with in syscall.go (the file does exist) but the error makes no sense.
I have been stuck on this for some time now and have tried all I can do.
Please help if possible,
The text was updated successfully, but these errors were encountered: