Excluding node_modules with skip_files in a nodejs runtime environment?

41 views
Skip to first unread message

John White

unread,
Mar 19, 2018, 9:25:32 AM3/19/18
to Google App Engine
Hi all
I noticed that every time I ran `gcloud app deploy`, it has to upload a .tgz with all files, including node_modules. AFAIK this is recreated in the server, so it's pointless to upload it. So I added the folder to the exclusion list, and it became way faster.

It's hard to find any doc on this, but shouldn't this folder be already excluded when deploying? Is it a good thing to exclude it?

Thanks

Steren Giannini

unread,
Mar 19, 2018, 1:41:35 PM3/19/18
to google-a...@googlegroups.com
Hi,

You should use the skip_files attribute of app.yaml to skip the node_modules folder. For example:
skip_files:
  - ^.*node_modules(/.*)?

We are later going to introduce a new mechanism soon, using a .gcloudignore file.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/24404191-0f9d-4058-b4cc-0e42fb009e63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages