Polymer grunt: Fatal error: spawn dev_appserver.py ENOENT

553 views Asked by At

I'm trying to run the Polymer Docs locally, but I get an error when trying to serve the app with grunt:

Running "appengine:run:frontend" (appengine) task
executing: dev_appserver.py --port=3000 --host=0.0.0.0 .
Fatal error: spawn dev_appserver.py ENOENT

(Full output)

The only relevant info I could find was this on the polymer-dev forum, but in that case the issue was using the incorrect Google App Engine SDK. I am using the Python SDK and I'm running Python 2.7.9.

EDIT: If you're finding this now, it's much easier to avoid this issue and use Gulp instead, basing it off of the Polymer Starter Kit gulpfile.

1

There are 1 answers

1
Kayce Basques On BEST ANSWER

I was having the same troubles on Ubuntu 14.04. The solution for me was to add the absolute path to the Google App Engine Python SDK directory to my $PATH environment variable.

  1. Edit shell startup script (I'm assuming you're using bash):

    vim ~/.bashrc

  2. Add the absolute path to Google App Engine directory:

    PATH="$PATH:/absolute/path/to/google_app_engine"

  3. Save and close file.

  4. Remember that the changes won't take effect until the next time your shell starts up, so close and re-open your terminal now.

If that doesn't help, keep in mind that the ENOENT error generally means that a script is trying to access a file or directory that doesn't exist. So, for some reason, the path that Grunt is using to access the Google App Engine is incorrect.