Not able to install firebase cli globally

  1. When installed from console it is showing below message:
    A store server is running. All store manipulations are delegated to it.
    WARN using --shamefully-flatten is discouraged, you should declare all of your dependencies in package.json
    ERROR EACCES: permission denied, mkdir ‘/home/nvm/.nvm/versions/node/v8.11.3/pnpm-global/1_shamefully_flatten’

  2. It is installed from package.json successfully but when i accessed from console it is showing below message :
    module.js:549
    throw err;

Error: Cannot find module ‘stream-shift’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/rbd/pnpm-volume/adf3def2-bd16-4f63-b023-499883b45200/node_modules/.registry.npmjs.org/duplexify/3.6.0/node_modules/duplexify/index.js:4:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

Can anybody guide me how to fix this problem ?

It looks like doing the global install is the problem.

Here’s what tipped me off:

Apparently Glitch makes locally-installed packages available globally too… so drop the “-g” flag and it should work fine.

Hello, sorry for such a late reply. If you install the CLI module as a dev dependency pnpm i --save-dev <module> then it will make the binary files available in node_modules/.bin/<binary-file> The binary-file would be the same as the command you’d call when using firebase. Example with the vue cli:

# Install vue-cli module
pnpm i --save-dev vue-cli

# Initiate a new webpack project.
./node_modules/.bin/vue init webpack

Hope it helps, have a nice weekend!