clasp icon indicating copy to clipboard operation
clasp copied to clipboard

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

Open swopno1 opened this issue 4 years ago • 7 comments

(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

Specifications

  • Node version (node -v): v14.17.6
  • Version (clasp -v): 2.4.1
  • OS (Mac/Linux/Windows): Windows

swopno1 avatar Sep 22 '21 14:09 swopno1

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

joshsny avatar Oct 15 '21 13:10 joshsny

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

JJPell avatar Nov 09 '21 09:11 JJPell

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

Maxsh avatar Dec 23 '21 11:12 Maxsh

Any updates?

your-diary avatar Apr 28 '22 13:04 your-diary

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

lekseys avatar Jun 27 '22 00:06 lekseys

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

iamsanteri avatar Mar 13 '24 17:03 iamsanteri