wasmerio / wasmer-go

🐹🕸️ WebAssembly runtime for Go
https://pkg.go.dev/github.com/wasmerio/wasmer-go
MIT License
2.84k stars 161 forks source link

Fail to execute the simple.go example. #381

Open orangeC23 opened 1 year ago

orangeC23 commented 1 year ago

Summary

Fail to execute the simple.go example.

Additional details

When executing the https://github.com/wasmerio/wasmer-go/blob/master/examples/appendices/simple.go example, it prints : no required module provides package github.com/wasmerio/wasmer-go/wasmer: go.mod file not found in current directory or any parent directory; see 'go help modules'

wwwAngHua commented 8 months ago

get this:

go get github.com/wasmerio/wasmer-go/wasmer
wwwAngHua commented 8 months ago
go mod init xxx
glloydNAT commented 6 months ago

I was having this problem but solved it by adding my project directory to my go.work file... idk if this helps (and it's also been a year+ since you asked, but i found your post in trying to solve my own problem and wanted to share what worked for me)