`clasp push` fails with custom root directory
See original GitHub issueExpected Behavior
clasp push
works when I’ve specified a custom rootDir
in .clasp.json
.
Actual Behavior
clasp push
doesn’t work when I’ve specified a custom rootDir
in .clasp.json
.
PS C:\src\gas\XP Logbook> Get-Content .\.clasp.json
{
"scriptId": "<SCRIPT_ID>",
"rootDir": "../../git/xp-logbook/src"
}
PS C:\src\gas\XP Logbook> Get-ChildItem ..\..\git\xp-logbook\src\
Directory: C:\src\git\xp-logbook\src
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2018-06-03 22:29 node_modules
-a---- 2018-06-07 21:00 75 .claspignore
-a---- 2018-06-07 19:45 442 appsscript.json
-a---- 2018-06-07 19:45 825 database.js
-a---- 2018-06-07 19:45 252 macros.js
-a---- 2018-06-03 22:29 382 package-lock.json
-a---- 2018-06-07 19:45 516 players.js
-a---- 2018-06-07 19:45 5543 sessions.js
-a---- 2018-06-07 19:45 1152 sheets.js
-a---- 2018-06-07 18:43 50 _imports.js
PS C:\src\gas\XP Logbook> clasp push
Push failed. Errors:
Project contents must include a manifest file named appsscript.
Files to push were:
PS C:\src\gas\XP Logbook>
Steps to Reproduce the Problem
- Create a
.clasp.json
file with a validscriptId
and a customrootDir
clasp pull
clasp push
It looks like files.getProjectFiles()
strips rootDir
, but commands.push()
doesn’t add it back before attempting script.projects.updateContent()
.
https://github.com/google/clasp/blob/98026240317c4a5107dadc6b99daffb2ccb089e9/src/files.ts#L101-L110
Specifications
- Node version 10.3.0
- Clasp version 1.3.1
- Windows 10 x64 v 1803
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Google sheets: clasp push command fails - Stack Overflow
I am trying to push Google App Scripts code to cloud using the following command clasp push. But it fails with the following...
Read more >UNPKG - @google/clasp
The CDN for @google/clasp. ... 57, - Easily add custom Google OAuth scopes ... 148, - `--rootDir <dir>`: Local directory in which clasp...
Read more >CLASP Web App, Google Apps Script, Parcel JS ... - YouTube
In this tutorial we'll use CLASP with many other tools like Parcel JS bundler, Nodemon, Node JS and setup a Web App Google...
Read more >Editor not updated after files added/removed via clasp
edit: I found that in my case the issue was due to a syntax error in one of the pushed files. If I...
Read more >Google Apps Script to Visual Studio Code with Clasp
I don't mind the Google Apps Script built-in online editor. It provides word completion, error handling, and pretty formatting, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ShowMeBillyJo, @agektmr, @misterludden, Can you try installing the latest version,
1.5.3
? I think I’ve solved this issue.Tests:
Sorry for the troubles and delayed fix.
I must have broken custom directories with typescript support. I’ll fix this issue next week.
In the meanwhile, use 1.4 for now.