gemini cli getting file not defined error

 While trying to run gemini cli on my windows linux subsystem, i bump into this error here -

"/Roaming/npm/node_modules/@google/gemini-cli/node_modules/undici/lib/web/webidl/index.js:512

webidl.is.File = webidl.util.MakeTypeAssertion(File)"

 "ReferenceError: File is not defined"




In Node.js, there’s no built-in File (until very recent Node 20+ with experimental WHATWG APIs). So, unless polyfilled, File is undefined, leading to the ReferenceError.


And to resolve this, I had to upgrade to node 22 (might work for node 20) and then I was able to run it.





Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error