Clasp: Command Failed: clasp push

Created on 6 Aug 2018  ยท  4Comments  ยท  Source: google/clasp

The push command is failing because Clasp is unable to read the appsscript.json file in the root directory though it exists.

The issue is specific to clasp v1.5.2 though it works with the 1.4 release.

https://github.com/labnol/apps-script-starter/issues/2

`โžœ ls dist
appsscript.json
code.js
oauth2.js

โžœ npx clasp status
Not ignored files:
โ””โ”€ dist/code.js
โ””โ”€ dist/oauth2.js

Ignored files:
โ””โ”€ dist/appsscript.json

โžœ npx clasp push
Push failed. Errors:
Project contents must include a manifest file named appsscript.
Files to push were:
โ””โ”€ dist/code.js
โ””โ”€ dist/oauth2.js
`

bug

All 4 comments

Thanks for the report. I'll address this issue soon.

Hey @labnol, I spend a few minutes today trying to fix this issue.

However, I'm not sure what the problem is. This is my config:

Files

.clasp.json

{
  "scriptId":"11AIejfE3_Qbmh0BO1Yb0g75c0giLjWlghFcALj9BI6OTLHI7JyDU-Pph",
  "rootDir": "dist"
}

dist/foo.js

Logger.log('hi');

dist/appsscript.json

{
  "timeZone": "America/New_York",
  "dependencies": {
  },
  "exceptionLogging": "STACKDRIVER"
}

Issue

It seems like you're looking to have the appsscript.json file be separate from the Apps Script project (as in, outside of dist/). This doesn't seem like a good idea since that file is part of the source files for the Apps Script project.

For your config, can you make sure that appsscript.json is in your rootDir, or copy it there?

I don't really want to look at both your .clasp.json directory _and_ your rootDir directory to find the manifest file.

Hello @grant - The manifest file is in the rootdir itself and the clasp push command is still ignoring it for some reason.

I upgraded to Clasp 1.5.3 today and it seems to have resolved the issue. Thanks for the help.

I confirm that the problem was in versions above 1.4 and below 1.5.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DominikPalo picture DominikPalo  ยท  4Comments

hariharasuthan-balaji picture hariharasuthan-balaji  ยท  8Comments

tehhowch picture tehhowch  ยท  3Comments

grant picture grant  ยท  4Comments

nirazul picture nirazul  ยท  7Comments