Clasp create --parentId <ID> errors out
(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)
Expected Behavior
A project would be created using the provided ID as the parent. The ID is from a Google Spreadsheet
Actual Behavior
The program errors out and spits out the following message:
Request contains an invalid argument
Steps to Reproduce the Problem
- Create a spreadsheet and copy the ID
- Call
claps create --parentID <ID from the previous step>
Specifications
- Node version (
node -v): v22.5.1 - Version (
clasp -v): 2.4.2 - OS (Mac/Linux/Windows): Mac
Looks like may be an issue with the Apps Script API itself, getting a "Requested entity not found" issue from the underlying API when trying to create a container bound script. Works if creating the container (the --type option) so think this may be a change in how drive files are accessed and which scopes are required (but if there was a change, it's not yet documented, so considering it a bug.)
This may be related to new documents -- files that have been created, but not yet modified in any way (default title/content). These are in a weird state and API fails with them. If same issue, giving the doc a title or any thing to trigger an explicit save should resolve it. There's a feature request filed to have the API do this automatically, but in the mean time try that workaround