google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.52k stars 422 forks source link

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

Open hjfreyer opened 9 months ago

hjfreyer commented 9 months ago

(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

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 commented 9 months ago

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 commented 9 months ago

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