Hello, I am experiencing some error with cloning a particular google apps project. I have then exported it and tried to push and pull from it but I still get the same error followed by a hang:
Pulling files...(node:82926) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
at /usr/local/lib/node_modules/@google/clasp/index.js:327:39
at /usr/local/lib/node_modules/@google/clasp/node_modules/googleapis/build/src/lib/apirequest.js:88:42
at process._tickCallback (internal/process/next_tick.js:68:7)
The directory is buildable and I have the .clasp.json in it so I am not sure what I might be missing or is it part of some permissioning problem.
Running with:
Node v10.1.0
├─┬ @google/[email protected]
Mac
Can anyone advice what it might be related to.
Thanks,
Yulia
Hey @Narrenschyff I believe this has been fixed, but has not been pushed to npm yet. Can you give us the steps you used to get this error?
@grant I think it is time to update npm again.
Can you try the latest, 1.3.1?
Updated to 1.3.1. Upon clasp clone < myScriptID > Getting the same error with different line number:
Pulling files...(node:85323) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
at /usr/local/lib/node_modules/@google/clasp/index.js:274:39
at /usr/local/lib/node_modules/@google/clasp/node_modules/googleapis/build/src/lib/apirequest.js:88:42
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:85323)
Just a note that this project has been shared with me and I have edit permissions. I am not the owner.
Hello again, I discovered it's a problem with the url from here: https://developers.google.com/apps-script/api/reference/rest/v1/projects/getContent; I am getting a 500 back from the request. Anyone has any pointers who is it relevant to file an issue with? Also may be it would be useful to handle more gracefully the script.projects.getContent in case of error since I got the data of undefined error.
Hey @Narrenschyff I made a PR to fix that PromiseRejection error you are getting for now.
I’ll update npm soon
Let me know when it's available on npm
@Narrenschyff I just published the latest to npm, 1.3.2.
LMK if this issue is fixed. If not, I should this issue should be kept open.
Most helpful comment
I’ll update npm soon