Make error on server but success on macos

js/summary.go:24:2: cannot find package "." in:
        /home/ec2-user/k6/k6-test/vendor/embed
make: *** [build] Error 1
ec2-user@ip-10-18-16-60 k6]$ `git clone https://github.com/grafana/k6.git k6-test`
Cloning into 'k6-test'...
remote: Enumerating objects: 38093, done.
remote: Counting objects: 100% (2018/2018), done.
remote: Compressing objects: 100% (1054/1054), done.
remote: Total 38093 (delta 1138), reused 1559 (delta 924), pack-reused 36075
Receiving objects: 100% (38093/38093), 22.77 MiB | 11.04 MiB/s, done.
Resolving deltas: 100% (24103/24103), done.
[ec2-user@ip-10-18-16-60 k6]$ cd k6-test/
[ec2-user@ip-10-18-16-60 k6-test]$ ls
api               cloudapi            CONTRIBUTING.md  docker-compose.yml  go.mod   js          loader   Makefile             packaging      samples     ui
assets            cmd                 converter        Dockerfile          go.sum   lib         log      modtools_frozen.yml  README.md      stats       vendor
build-release.sh  CODE_OF_CONDUCT.md  core             errext              grafana  LICENSE.md  main.go  output               release notes  SUPPORT.md
[ec2-user@ip-10-18-16-60 k6-test]$ `go version`
go version go1.15.14 linux/amd64
[ec2-user@ip-10-18-16-60 k6-test]$ `git checkout v0.33.0`
Note: switching to 'v0.33.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at cc0361ca Fix CI process to only depend on tests with latest stable Go
[ec2-user@ip-10-18-16-60 k6-test]$ `make`
go build
js/summary.go:24:2: cannot find package "." in:
        /home/ec2-user/k6/k6-test/vendor/embed
make: *** [build] Error 1
[ec2-user@ip-10-18-16-60 k6-test]$ `uname -a`
Linux  5.10.75-79.358.amzn2.x86_64 #1 SMP Thu Nov 4 21:08:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Hi @rawbin,
you’re using a go version 1.15 instead of the expected Go 1.16 required for k6 v0.33.0. The embed feature has been introduced in Go 1.16. Can you try upgrading it, please?

I would also encourage you to try the use of one of the available binaries Installation, and k6 has more recent versions released. The latest k6 is v0.36.0, if an older version isn’t a strict requirement you could give it a try Release v0.36.0 · grafana/k6 · GitHub

@codebien thanks a lot for the answer
I updated the version to 1.17.7 once but got more similar errors and find no correct reason
and then I tried twice with the same steps,and succeed ,and it works as expect