Cassini
Cassini

Reputation: 29

Cannot Install FIREBASE via NPM GLOBALLY (Error 127)

I cannot install firebase via npm install -g firebase. I receive the following error that I could not find a solution for:

The issue seem to be relatedd to core-js & protobufjs which cannot be postinstall.

Note: I did reinstall node.js multiple times already - without any luck.

51 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 374ms
52 timing auditReport:getReport Completed in 377ms
53 silly audit report {}
54 timing auditReport:init Completed in 0ms
55 timing reify:audit Completed in 377ms
56 timing reifyNode:node_modules/@firebase/polyfill/node_modules/core-js Completed in 1368ms
57 timing reifyNode:node_modules/core-js Completed in 1470ms
58 timing reify:unpack Completed in 1470ms
59 timing reify:unretire Completed in 0ms
60 timing build:queue Completed in 1ms
61 info run [email protected] postinstall node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
62 info run [email protected] postinstall node_modules/@firebase/polyfill/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
63 info run [email protected] postinstall { code: 127, signal: null }
64 info run [email protected] postinstall { code: 127, signal: null }
65 timing reify:rollback:createSparse Completed in 338ms
66 timing reify:rollback:retireShallow Completed in 31ms
67 timing command:install Completed in 2501ms
68 verbose stack Error: command failed
68 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs2\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
68 verbose stack     at ChildProcess.emit (node:events:390:28)
68 verbose stack     at maybeClose (node:internal/child_process:1064:16)
68 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
69 verbose pkgid [email protected]
70 verbose cwd C:\Users\chmit_000
71 verbose Windows_NT 10.0.19042
72 verbose argv "C:\\Program Files\\nodejs2\\node.exe" "C:\\Program Files\\nodejs2\\node_modules\\npm\\bin\\npm-cli.js" "install" "core-js"
73 verbose node v16.10.0
74 verbose npm  v7.24.0
75 error code 127
76 error path C:\Users\chmit_000\node_modules\core-js
77 error command failed
78 error command bash -c node -e "try{require('./postinstall')}catch(e){}"
79 error /bin/bash: node: command not found
80 verbose exit 127

Upvotes: 0

Views: 981

Answers (1)

JayCodist
JayCodist

Reputation: 2554

The package meant for global installation is firebase-tools. That's the CLI used for deploying your app (or parts of it) to firebase, as well as performing other administrative tasks. The firebase package is the library used for accessing firebase backend/cloud functions in a web/mobile project.

If you're looking to install the CLI, run npm install -g firebase-tools.

Here are links to both packages:

firebase

firebase-tools

Upvotes: 1

Related Questions