clasp icon indicating copy to clipboard operation
clasp copied to clipboard

Google Cloud Shell: since @google/clasp v2.4.0 "clasp push -w" crashes

Open JShinigami opened this issue 2 years ago • 3 comments

DOES WORK: npm i @google/[email protected] -g clasp push -w

DOES NOT WORK: npm i @google/clasp -g clasp push -w

ERROR /usr/local/nvm/versions/node/v12.14.1/lib/node_modules/@google/clasp/build/src/index.js:2 import why from 'wtfnode'; // should be your first require ^^^^^^

SyntaxError: Cannot use import statement outside a module at Module._compile (internal/modules/cjs/loader.js:891:18) at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10) at Module.load (internal/modules/cjs/loader.js:811:32) at Function.Module._load (internal/modules/cjs/loader.js:723:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) at internal/main/run_main_module.js:17:11

SPECIFICATIONS Google Cloud Shell, bash terminal NPM v8.5.0 Node v12.14.1

JShinigami avatar Feb 27 '22 06:02 JShinigami

Same issue any update?

I cannot event do a clasp version

bdetry avatar Sep 09 '22 14:09 bdetry

Updating to the lastested node version solved the issue.

I updated from 10 to 14.

Google docs says its wotk from node version 4.

Please update

bdetry avatar Sep 09 '22 15:09 bdetry

My cloud shell currently uses node v16.4.0 which seems to be the latest LTS version.

Now there is a new error when using the following commands:

npm i @google/clasp -g
clasp push -w

Error: drive.google.com ✖ Error: Looks like you are offline.

JShinigami avatar Sep 10 '22 06:09 JShinigami

Seems to be fixed in the meantime.

JShinigami avatar Nov 10 '23 07:11 JShinigami