Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`cannot find package "appengine" error` when using VS code

By following this tutorial I created a go lang project and opened it by Visual Studio Code.

The code itself works fine I can run the server, but somehow VS Code shows

cannot find package "appengine" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/appengine (from $GOROOT)
    /Users/ironsand/go/src/appengine (from $GOPATH)

I thought I must set GOROOT for the Google App Engine, but according to this stackoverflow question I shouldn't.

How to make VS Code recognize google app engine library properly?

More info

The appengine package exists in ~/dev/google-cloud-sdk/platform/google_appengine/goroot-1.8/‌​src/appengine

I'm using macOS Sierra 10.12.6.

like image 588
ironsand Avatar asked Sep 13 '17 06:09

ironsand


Video Answer


1 Answers

I did use that tutorial and it's working on my Mac via terminal and via VS Code.

You may follow this tutorial to be able use VS code to deploy GAE app with python: Deploy GAE app with VS code

• Dont forget to update path of dev_appserver.py in tasks.json.

If that didn't work out, you would need to re-install/init google-cloud-sdk.

Note that it's necessary to provide root privileges during installing/initializing in order to allow installer script to add paths properly.

Last thing: avoid tilde expansion ~ in path. Use absolute path in config.( in general absolute path must be used always unless there is a reason to use relative address with tilde )

Good luck,'.

like image 169
Maher Abuthraa Avatar answered Oct 11 '22 04:10

Maher Abuthraa