-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot find module providing package #1502
Comments
@qw1mb0 The error output is not very helpful unfortunately. Looking at the code, my guess would be that there was an error compiling the code generation binaries, which is the next step after creating the CRD. The code I'm thinking is the culprit is here and here Do you have any files in |
I also have similar issue. It was working last week, but today, when I tried to create a new operator, I got this following error (My OS is macOS Mojave ): nauvoo-3:app-operator super$ operator-sdk add api --api-version=app.example.com/v1alpha1 --kind=AppService W0530 12:18:01.303688 53532 parse.go:239] Ignoring child directory github.com/moss-inc/app-operator/pkg/apis/app/v1alpha1: unable to import "github.com/moss-inc/app-operator/pkg/apis/app/v1alpha1": go/build: importGo github.com/moss-inc/app-operator/pkg/apis/app/v1alpha1: exit status 1 INFO[0000] Created deploy/crds/app_v1alpha1_appservice_crd.yaml |
Well, in my case, my go.mod had the following: |
@qw1mb0 can you run
I had problems with that, I resolved it setting the right value for |
You can try to update your go version to |
@qw1mb0 @mossuchida are you running |
Yes, I am running the command in $GOPATH/src/app-operator dir. I have upgraded go version to v1.12.5, but still the same issue. Maybe I need to upgrade Operator SDK also? (Are there upgrade documentation?) . Currently, my version is operator-sdk version: v0.7.0 |
Try running the following: $ mkdir -p pkg/apis/app && echo "package app" > pkg/apis/app/stub.go To see if that gets rid of the first error. |
I got this similar issue
|
@qw1mb0 @mossuchida have you tried the suggested fix? |
I just changed go.mod operator-sdk v0.8.x to operator-sdk v0.8.1 @estroz , it works now |
Hm. |
After upgrading to v0.8.1, It seems like it is working although I see some errors while creating. Is this expected? INFO[0011] Created deploy/crds/app_v1alpha1_appservice_crd.yaml |
@mossuchida yes, see #1546 |
hi, same issue with you, please help to share your solution detail info. |
manual edit go.mod file, replace |
After add --verbose flag all fine. |
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Without such file in place, code-generation using `operator-sdk generate openapi` tends to fail. This is fixed in later versions of `operator-sdk`, which generate exactly this file when scaffolding a new API. See: operator-framework/operator-sdk#1401 See: operator-framework/operator-sdk#1502 See: operator-framework/operator-sdk#1546
Is anyone running into this issue with 0.13?
|
@sfxworks can you open a new issue detailing your environment info? Thanks! |
What did you do?
I following the guide to add example-inc API, but got cannot find module providing package:
What did you expect to see?
I pass without error
What did you see instead? Under which circumstances?
I use the operator-sdk v0.8.1 release and make install to build and install.
Environment
operator-sdk version:
operator-sdk version: v0.8.1, commit: 33b3bfe10176f8647f5354516fff29dea42b6342
Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.0", GitCommit:"0ed33881dc4355495f623c6f22e7dd0b7632b7c0", GitTreeState:"clean", BuildDate:"2018-09-27T17:05:32Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind:
minikube
go version:
go version go1.12 linux/amd64
go variables:
/home/user/go/src/github.com/example-inc/app-operator
The text was updated successfully, but these errors were encountered: