Skip to content
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

Modus Go build failing Win11 #676

Closed
gurveervirk opened this issue Jan 4, 2025 · 10 comments
Closed

Modus Go build failing Win11 #676

gurveervirk opened this issue Jan 4, 2025 · 10 comments
Labels
bug Something isn't working

Comments

@gurveervirk
Copy link
Contributor

gurveervirk commented Jan 4, 2025

Bug Description
Modus Go build fails in Win11. It shows that the user path is not found (eg: "C:/Users/..." is not recognized as an internal or external command, operable program or batch file.).

I have installed all the required dependencies, to my knowledge.

To Reproduce
Steps to reproduce the behavior:

  1. modus new
  2. Selected Go SDK
  3. Tried modus dev and modus build
  4. Throws this error

Expected behavior
Build should succeed. 😅
Environment

  • OS: Windows 11 (Not sure about the other OS's)
  • Go
  • v0.16.0

Partial Solution in the CLI tool
Added the following line after line 78 in dist/commands/build/index.js:
buildTool = '"' + buildTool + '"';

However, the build still fails with a long (I think) go, wasm related error:
error: unable to make temporary file: No such file or directory error: unable to make temporary file: No such file or directory failed to build C:\Users\username\scoop\apps\tinygo\current\src\internal\task\task_asyncify_wasm.S: exit status 1 Error building wasm: exit status 1

Please let me know the solution for this issue.

@gurveervirk gurveervirk added the bug Something isn't working label Jan 4, 2025
@gurveervirk
Copy link
Contributor Author

I was able to solve this issue.

Steps:

  1. Made sure scoop is installed
  2. scoop uninstall tinygo
  3. scoop install tinygo
  4. scoop install main/go (basically reinstalled go)
  5. scoop install binaryen (refer this issue)
    Done!

@gurveervirk
Copy link
Contributor Author

Opened a PR #677 to help fix this.

@gurveervirk
Copy link
Contributor Author

Closing as PR merged. Thanks!

@jairad26
Copy link
Member

jairad26 commented Jan 4, 2025

pushed as v0.16.1 of the modus-cli

@mattjohnsonpint
Copy link
Member

Hi @gurveervirk - Sorry I didn't see this sooner, I was away on vacation.

I'm glad you were able to resolve the issue, but just FYI, all you needed to do was step 5. The TinyGo docs cover this:

https://tinygo.org/getting-started/install/windows/

In other words, scoop install tinygo followed by scoop install binaryen for WASM support. Or you can do it in a single command, scoop install tinygo binaryen

I'm not sure why you needed to reinstall (big) Go though. If it wasn't installed originally, the Modus CLI should have warned you. It tests for both Go and TinyGo, and that they are at least the required versions. Though, it would probably be good for us to add a check for Binaryen also - since it's not necessarily installed by default with TinyGo, (depending on OS).

As for the PR - that shouldn't have been done. The two uses of the buildTool variable are both calling Node.js APIs that expect a path - not a quoted string. Testing locally, modus build and modus dev were functional in CLI v0.16.0 but are now broken in CLI v0.16.1. I will need to revert the change and redeploy.

@mattjohnsonpint
Copy link
Member

Modus CLI v0.16.2 has been released, with the PR change reverted. Please update. If you are then still having any Windows issues, please let me know and I can work with you to resolve. Thanks.

@gurveervirk
Copy link
Contributor Author

Thanks @mattjohnsonpint. I'll check it out and let you know.

@gurveervirk
Copy link
Contributor Author

Modus CLI v0.16.2 has been released, with the PR change reverted. Please update. If you are then still having any Windows issues, please let me know and I can work with you to resolve. Thanks.

I just updated my Modus CLI version to 0.16.2. I am now again getting the same error when running both modus dev and modus build in Win11.

I have the following installed via scoop:

  1. go (main/go): 1.23.4
  2. tinygo: 0.35.0
  3. binaryen: 121

Please let me know how I should proceed with fixing this issue @mattjohnsonpint.

@gurveervirk gurveervirk reopened this Jan 7, 2025
@mattjohnsonpint
Copy link
Member

Let's troubleshoot this on discord. Thanks. https://discord.com/channels/1267579648657850441/1325117493886455811

@mattjohnsonpint
Copy link
Member

Fixed with #696 and released with Modus CLI 0.16.5. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants