Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

packr defaults to not using go modules, even with go 1.13+ and a go.mod available #269

Open
Bios-Marcel opened this issue Apr 20, 2020 · 1 comment

Comments

@Bios-Marcel
Copy link

If run without GO111MODULE=on, the import-paths generated by packr look like this for me home/user/projectfolder/. Since the go modules are the default by now, packr shouldn't require the environment variable, especially not if there's a go.mod available. I tried to fix this myself, but I can't really find the part of the code where this happens. Can anyone lead me in the right direction?

@WesleyBatista
Copy link

WesleyBatista commented Jan 5, 2021

Thanks for shining some light on the problem by opening this issue @Bios-Marcel!
Although I decided to not use this solution, I took the chance to verify that setting GO111MODULE=on indeed works 🙌

I also noticed that this issue starts happening with the v2.8.0. The latest working version for me is v2.7.1, and I install it with:

go get -u -v github.com/gobuffalo/packr/v2/packr2@v2.7.1

Unfortunately, I couldn't find the root cause for the problem when comparing the versions. My guess is that's something related to the removal of envy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants