Strange error when initializing firebase cli

I followed every step to set it up, but when i install dependencies it says

npm ERR! code 1
npm ERR! path C:Projectsmercuryfunctionsnode_modulesprotobufjs
npm ERR! command failed
npm ERR! command C:Usersjulian.cachefirebaseruntime/shell.bat -c -- node scripts/postinstall
npm ERR! '--' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

when i try to deploy after i get

Error: Error parsing triggers: Cannot find module 'firebase-functions/v2/https'
Require stack:
- C:Projectsmercuryfunctionsindex.js
- C:Usersjulian.cachefirebasetoolslibnode_modulesfirebase-toolslibdeployfunctionsruntimesnodetriggerParser.js
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.

i tried:

npm cache clean --force
npm uninstall firebase-tools -g
npm install -g firebase-tools
firebase init

but i still get the error. does anyone know how to fix this??