danthareja / node-google-apps-script

[DEPRECATED - use clasp instead] The easiest way to develop Google Apps Script projects
MIT License
353 stars 70 forks source link

"Bad request" issue when uploading: Use of reserved words as object properties #56

Open brainysmurf opened 7 years ago

brainysmurf commented 7 years ago

In node, the following js does not result in any errors:

obj = {};
obj.const = {};
obj = {};
obj.function = {};

However, in App Script it does. Line 2 in both examples would generate error "Missing name after . operator" in apps script online editor. Nor is this detected in any linters. Unexpected consequence is that we get "Bad Error" when attempting to upload.

Documenting for reference; the problem really isn't with this package. Hopefully documenting here may save hours of head-scratching.

climateamante commented 7 years ago

The following file names trigger a similar error:

Able to upload and sync back up with Google Drive using node-google-apps-script once renamed.

old name: debug.html | debug.js new name: template.debug.html | app.debug.js

oshliaer commented 7 years ago

It's not the current app. The best way is to check files names and code in the native IDE screenshot from 2017-07-10 15-51-42