Cannot find module providing package

(Andre) #1

I’m using Go1.13. My project used and before I initialized modules it worked. When modules was initialized by go mod init the project cannot run. I’ve go the following error:

go: finding v2.0.1
go: finding v2.0.1
build cannot load cannot find module providing package

How can I solve it?

(Norbert Melzer) #2

Have you tried following the instructions from the README to import directly from github:

It is go get -able via via at , but we highly recommend using package management tool like [dep][7] or [Glide][8] and make use of semantic versioning. With package management you should import and specify that you’re using version 2.0.0.

(Andre) #3

Well, if gopackages is intended to replace all of those 3rd party dependency tools is not it overhaed to keep into the project another package management tool alogside with gopackages?

I would rather will find another option to replace that blackfriday if they even aren’t able to provide a usable mechanism to use the package.

(Norbert Melzer) #4

Go modules got “invented” to obselete all those third party solutions, yes. Anyway, those that used or other third party solutions have decided to support it a long time ago and now pay the additional cost of legacy maintenance at least for a transition phase that can take several years, until go prior to 1.12 has disappeared from living linux distributions.

Tech debts, legacy support… Known concepts and big problems in the world of IT and hard to solve…

And I haven’t tried that package[*], but as you are already using go modules, have you tried to just use blackfriday by importing it from GitHub rather than

[*] My current machine hasn’t a recent go available.


And if you really have problems even using GitHub imports to get it running with Go modules, feel free to open a ticket at their repository. Go modules will eventually replace all other tools, as it is the officially provided tool. Everything else will remain a crutch…

(Andre) #5

I used it in a recommended way by go get and import "" But prior to modules.

Did you mean the same?

(Norbert Melzer) #6

Your IP suggests you are using go modules, go modules is a tool to manage dependency versions, and the README asks you to import from GitHub when using such a tool. So have you tried importing from GitHub?

(Andre) #7

Now I imported from github and could use it in a simple project which uses modules.
But then I tried to use it alongside with md2pfd and it failed:

go: finding v2.0.1
go: finding v2.0.1
build command-line-arguments: cannot load cannot find module providing package

my imports

    import (


So as you see there is a problem here…

(Norbert Melzer) #8

Are you talking about

That hasn’t been touched for 4 years, I expect a lot of incompatibilities.

If you are talking about something else you’ll need to elaborate.

(Andre) #9

no, about this
This hasn’t been touched for about one year, but it seems there are some incompatibilities also.

(Norbert Melzer) #10

Yeah, they are importing from this can’t work from a go modules context.

Either fork that project and fix the imports or search for another converter that actually is compatible with modules.

(Andre) #11

could you please describe it more in detail,
after it will be forked where should I fix imports and what to fix?

(Norbert Melzer) #12

Well, you fork the mdtopdf project and change all imports of blackfriday to its GitHub equivalent, while also changing all internal imports to your fork.

(Andre) #13


(Andre) #14

the last question, why importing from doesn’t work for a go modules context?

(Norbert Melzer) #15

It probably would, if the package provided didn’t have a go.mod file contradicting the import path.

(system) closed #16

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.