How to fix Google-cloud-sdk 156.0.0 “There are too many files in your application for changes in all of them to be monitored.”?

后端 未结 4 2669
野性不改
野性不改 2021-02-19 18:55

I just installed Go 1.6.4 and google-cloud-sdk 1.56.0.0 on osX.

When I attempt to run the local dev_server I get the following warning.

/Users/Bryan/go/src/googl

4条回答
  •  醉梦人生
    2021-02-19 19:37

    I only used an older version of appengine sdk, but I believe below is still true.

    The main issue is that you have google-cloud-sdk inside your GOPATH. This should not be necessary. I have it installed in my path. But even if not installed it should be resolving it's location relative to the executable or script you are running and should find all required sdk files properly. At the same time SDK is roughly 7500 files and you only need to have more than 10000 (approx) in your GOPATH to get that "to many files" warning. So, if you have another (e.g. older) copy of SDK or other big project inside same GOPATH, you are pretty much guaranteed to exceed the threshold. Just locate /Users/Bryan/go in Finder and use "Get Info" to count files.

    So, either move appengine SDK outside of your GOPATH. Or make a new folder, export it as your new GOPATH and move your project files (but not SDK) to that new folder. This should fix the "too many files issue".

    The other issue is that your app actually fails to build. And as you have already figured out yourself the (immediate) issue is missing appengine package.

    But the correct way of getting google.golang.org/appengine is as follows: go get google.golang.org/appengine

    Though keep in mind that GOPATH must be set correctly before running the above command. It will fetch google.golang.org/appengine and all it's dependencies.

    Once you have retrieved all required packages (and fixed errors, if any) it should compile and run without issues.

提交回复
热议问题