You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## I see deepcopy errors and image build fails. How do I fix this?
127
+
128
+
When you run the ```operator-sdk generate k8s``` command, you might see an error like this
129
+
130
+
```
131
+
INFO[0000] Running deepcopy code-generation for Custom Resource group versions: [cache:[v1alpha1], ]
132
+
F0523 01:18:27.1220345157 deepcopy.go:885] Hit an unsupported type invalid typefor invalid type, from github.com/example-inc/memcached-operator/pkg/apis/cache/v1alpha1.Memcached
133
+
```
134
+
135
+
This is because of the `GOROOT` environment variable not being set. More details [here][goroot-github-issue].
136
+
137
+
In order to fix this, you simply need to export the `GOROOT` environment variable
138
+
139
+
```
140
+
$ export GOROOT=$(go env GOROOT)
141
+
```
142
+
143
+
This will work for the current environment. To persist this fix, add the above line to your environment's config file, ex. `bashrc` file.
0 commit comments