Я пытаюсь реализовать функции firestore / firebase для реализации входа в Google OAuth, но постоянно повторяется, что firebase не импортируется:
CODE:
ERROR in node_modules/@angular/fire/auth/auth.d.ts:4:28 - error TS2307: Cannot find module 'firebase/app'.
4 import { User, auth } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:74 - error TS2307: Cannot find module 'firebase/app'.
2 import { auth, database, firestore, functions, messaging, storage } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firestore/collection-group/collection-group.d.ts:2:27 - error TS2307: Cannot find module 'firebase/app'.
2 import { firestore } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firestore/collection/collection.d.ts:2:27 - error TS2307: Cannot find module 'firebase/app'.
2 import { firestore } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firestore/document/document.d.ts:5:27 - error TS2307: Cannot find module 'firebase/app'.
5 import { firestore } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firestore/firestore.d.ts:8:27 - error TS2307: Cannot find module 'firebase/app'.
8 import { firestore } from 'firebase/app';
~~~~~~~~~~~~~~
node_modules/@angular/fire/firestore/interfaces.d.ts:2:27 - error TS2307: Cannot find module 'firebase/app'.
2 import { firestore } from 'firebase/app';
~~~~~~~~~~~~~~
src/app/services/auth.service.ts:4:22 - error TS2307: Cannot find module 'firebase/app'.
4 import { auth } from "firebase/app";
~~~~~~~~~~~~~~
ЧТО Я ПОПРОБОВАЛ:
Я попытался переустановить @ angular / fire, я попытался изменить 'firebase / app' на './firebase/app', я попытался найтирешение здесь, на StackOverflow, но ничего.
Спасибо за любые ответы!
попытался: установить угловую firebase, но: он говорит, что эта команда
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.0 and node@11.13.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node'
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/11.13.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/firebase/node_modules/grpc/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/firebase/node_modules/grpc/.node-gyp'
gyp ERR! System Linux 4.18.0-25-generic
gyp ERR! command "/usr/local/lib/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd /usr/local/lib/node_modules/firebase/node_modules/grpc
gyp ERR! node -v v11.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/lib/node_modules/node/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/firebase/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:193:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1001:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
node-pre-gyp ERR! System Linux 4.18.0-25-generic
node-pre-gyp ERR! command "/usr/local/lib/node_modules/node/bin/node" "/usr/local/lib/node_modules/firebase/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/firebase/node_modules/grpc
node-pre-gyp ERR! node -v v11.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/lib/node_modules/node/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v67-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
npm WARN @angular/fire@5.2.1 requires a peer of @angular/common@>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/fire@5.2.1 requires a peer of @angular/core@>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/fire@5.2.1 requires a peer of @angular/platform-browser@>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/fire@5.2.1 requires a peer of @angular/platform-browser-dynamic@>=6.0.0 <9 || ^9.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/fire@5.2.1 requires a peer of firebase@>= 5.5.7 <7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/fire@5.2.1 requires a peer of rxjs@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.24.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.24.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-10-16T13_45_44_371Z-debug.log
выполнялась в sudo suкстати