blackfriday icon indicating copy to clipboard operation
blackfriday copied to clipboard

installation issue - not sure what

Open ORESoftware opened this issue 4 years ago • 3 comments

looks like this is a dep of a dep in our project...when running go run . it's doing some go find/gets and we get:

cm safe push: gopkg.in/russross/blackfriday.v2: go.mod has non-....v2 module path "github.com/russross/blackfriday/v2" at revision v2.0.1

that causes an error in our build, not sure why

ORESoftware avatar Mar 12 '20 02:03 ORESoftware

I ran into this yesterday using blackfriday as a top-level dependency. The error is not very helpful but what it means is that go.mod file's require stanza should reflect what is used in blackfriday's go.mod module stanza.

e.g. https://github.com/russross/blackfriday/blob/v2/go.mod has:

module github.com/russross/blackfriday/v2

So go.mod should have:

require (
	github.com/russross/blackfriday/v2 v2.0.1 // indirect
	...
)

Since it's a transitive dependency in your case I'm not sure changing this in your go.mod will fix it. It might be you need your dependency to fix their mod file instead. go modules are a small disaster.

cbednarski avatar Mar 15 '20 23:03 cbednarski

[...] go modules are a small disaster.

Small correction: improper use of go modules (as blackfriday does: Issue 500 ) can cause small desasters. See: Using Go Modules

mwat56 avatar Apr 23 '20 09:04 mwat56

Try this one (as recommended in readme): gopkg.in/russross/blackfriday.v2 v2.0.1

isurzhenko avatar May 11 '20 21:05 isurzhenko