clasp
clasp copied to clipboard
Google Cloud Shell: since @google/clasp v2.4.0 "clasp push -w" crashes
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
Same issue any update?
I cannot event do a clasp version
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
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.
Seems to be fixed in the meantime.