Skip to content

E0918 error for stdlib imports: "Package bytes does not have module info" #302

@orsinium

Description

@orsinium

Originally posted by @jbw976 in #128:

I ran into this today when trying to do a license scan of the https://github.com/crossplane/crossplane project.


go install github.com/google/go-licenses@latest

git clone https://github.com/crossplane/crossplane.git

cd crossplane

go-licenses csv ./...

That shows many error messages like the following in the output:


E0918 09:17:45.767529   80705 library.go:117] Package bytes does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.

E0918 09:17:45.767626   80705 library.go:117] Package fmt does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.

E0918 09:17:45.785420   80705 library.go:117] Package errors does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.

E0918 09:17:45.803444   80705 library.go:117] Package cmp does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.

E0918 09:17:45.803465   80705 library.go:117] Package sort does not have module info. Non go modules projects are no longer supported. For feedback, refer to https://github.com/google/go-licenses/issues/128.

...

Looks like it's mostly the standard library. I was able to get some license scan output after running go install github.com/google/go-licenses@v1.0.0. Is there a different way I should be invoking latest to work successfully?

I have faced the same issue runnning go-licenses on a proprietary project, despite the project having a go.mod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions