question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with using clasp after v2.4.0 release

See original GitHub issue

Issue with using clasp after the new release (v2.4.0)

fs.js:498
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'package.json'
    at Object.openSync (fs.js:498:3)
    at Object.readFileSync (fs.js:394:35)
    at file:///usr/local/lib/node_modules/@google/clasp/node_modules/ts2gas/src/index.js:35:35
    at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
    at async Loader.import (internal/modules/esm/loader.js:177:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'package.json'
}

Seems to be dependency issue with ts2gas. Downgrading to v2.3.2 helped solve the issue.

Expected Behavior

clasp login/ any command would not work

Actual Behavior

clasp login etc to work.

Steps to Reproduce the Problem

Just install clasp and try to use it

  1. npm i @google/clasp -g
  2. clasp --help

Specifications

  • Node version (node -v): v14.17.0
  • Version (clasp -v): v2.4.0
  • OS (Mac/Linux/Windows): Mac

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:31
  • Comments:9

github_iconTop GitHub Comments

9reactions
dlackeycommented, Jul 9, 2021

Created an empty package.json file as a workaround. echo "{}" > package.json

4reactions
emiliorizzocommented, Jul 2, 2021

Same error on linux

Read more comments on GitHub >

github_iconTop Results From Across the Web

Editor not updated after files added/removed via clasp
A short description of the issue: when I clasp push to an apps script project, it sometimes takes a few tries until the...
Read more >
Microtubule-Associated Protein CLASP Is Translationally ...
The microtubule-associated protein CLASP is regulated at the translational level when root meristem growth is inhibited in dark-grown plants.
Read more >
U191U Band Compatible with Apple Watch Stainless Steel ...
... Stainless Steel Wristband Metal Buckle Clasp iWatch 38mm 40mm 41mm Strap Bracelet for Apple Watch Series 7/6/5/4/3/2/1 Sports Edition (Silver/Gold, ...
Read more >
Concepts View - OWASP Foundation
The CLASP Vulnerability Use Cases are based on the following common component architectures: ... 2 to 4 hours per iteration for manual collection....
Read more >
A User's Guide to gringo, clasp, clingo, and iclingo
Test part later on. The rule in Line 4 projects out the target peg of a move, i.e., the predicate move/2 can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found