clasp icon indicating copy to clipboard operation
clasp copied to clipboard

TypeError: Missing internal module 'internal/deps/node:stream'

Open hjfreyer opened this issue 2 years ago • 2 comments

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

Expected Behavior

I can log in.

Actual Behavior

I go through the Chrome OAuth flow, and the browser says "Logged in! You may close this page.", but in the console I get this error:

Error retrieving access token: TypeError: Missing internal module 'internal/deps/node:stream'

Steps to Reproduce the Problem

  1. Install npm with apt
  2. sudo npm install @google/clasp -g
  3. clasp login

Specifications

  • Node version (node -v): v18.13.0
  • Version (clasp -v): 2.4.2
  • OS (Mac/Linux/Windows): Linux

It seems folks have recently been seeing this error in other projects, so this may be a more widespread issue? https://github.com/nuxt/cli/issues/265

hjfreyer avatar Nov 02 '23 14:11 hjfreyer

I just tried to reproduce on another Linux machine, and everything worked. That machine still had clasp 2.4.2, but was running with node v12.22.12.

Interestingly, that nuxt bug filed last week was also running node v18.13.0 - though that was release back in January...

hjfreyer avatar Nov 02 '23 15:11 hjfreyer

Worked around it by using nvm to install v20.9.0.

hjfreyer avatar Nov 02 '23 15:11 hjfreyer