у меня возникает эта ошибка, когда я пытаюсь запустить firebase cli:
lapezealexis@lapezes-macbook-pro ~ % sudo firebase -V
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '@grpc/grpc-js'
Require stack:
- /usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/pubsub.js
- /usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/emulator/pubsubEmulator.js
- /usr/local/lib/node_modules/firebase-tools/lib/emulator/controller.js
- /usr/local/lib/node_modules/firebase-tools/lib/emulator/commandUtils.js
- /usr/local/lib/node_modules/firebase-tools/lib/commands/database-get.js
- /usr/local/lib/node_modules/firebase-tools/lib/commands/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/pubsub.js:23:14)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/index.js:81:16)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/pubsub.js',
'/usr/local/lib/node_modules/firebase-tools/node_modules/@google-cloud/pubsub/build/src/index.js',
'/usr/local/lib/node_modules/firebase-tools/lib/emulator/pubsubEmulator.js',
'/usr/local/lib/node_modules/firebase-tools/lib/emulator/controller.js',
'/usr/local/lib/node_modules/firebase-tools/lib/emulator/commandUtils.js',
'/usr/local/lib/node_modules/firebase-tools/lib/commands/database-get.js',
'/usr/local/lib/node_modules/firebase-tools/lib/commands/index.js',
'/usr/local/lib/node_modules/firebase-tools/lib/index.js',
'/usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js'
]
}
я делаю: sudo npm install -g firebase-functions
и запускаю: firebase - V
как я могу исправить эту ошибку, я пытаюсь удалить node_modules, npm очистить кеш, ...