google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.59k stars 428 forks source link

clasp push not working as expected. Showing error: ENOENT: no such file or directory, open 'package.json' #875

Open swopno1 opened 3 years ago

swopno1 commented 3 years ago

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

Push my clasp local file to Apps Script

Actual Behavior

Show this error: ENOENT: no such file or directory, open 'package.json'

Steps to Reproduce the Problem

1. 1.

Specifications

joshsny commented 3 years ago

You can fix this by creating an empty package.json file ({}) at the root of your directory

JJPell commented 2 years ago

This seems like an unnecessary dependency, is there any reason why clasp needs to use the package.json?

Maxsh commented 2 years ago

Can someone please describe that requirement in the documentation? How deal with that properly?

your-diary commented 2 years ago

Any updates?

lekseys commented 2 years ago

See also https://github.com/google/clasp/issues/856#issuecomment-1166703219

iamsanteri commented 7 months ago

Cannot believe this is still open. I guess things aren't very active here?

burkybang commented 5 months ago

I think this happens when clasp tries to show an error message. For some reason, it requires the package.json file in order to display an error message.

I went into more detail here: https://github.com/google/clasp/issues/856#issuecomment-2100610552