을 가져올 때 'protobuf.js'를로드 할 수 없습니다 : 다음 터미널 규칙베어 노드 파일을 실행하는 경우 FireStore 문서
Firestore (4.5.2) 2017-10-18T19:16:47.719Z: INTERNAL UNHANDLED ERROR: Error: Failed to fetch file at /.../project/node_modules/protobufjs/dist/protobuf.js:5164:30 at ReadFileContext.callback (/.../p/node_modules/protobufjs/dist/protobuf.js:358:29) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13) (node:43981) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to fetch file (node:43981) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
에서
const firebase = require("firebase");
const http = require('http')
require("firebase/firestore");
firebase.initializeApp({
apiKey: '...',
authDomain: '...',
databaseURL: '...',
serviceAccount: '...',
projectId: '...'
});
var db = firebase.firestore();
var userRef = db.collection('...').doc('...');
결과를하지만 난 node_modules 폴더를 확인하고있다 . 나는 또한 그것을 다시 설치하려고 시도하고, 다른 사람들은 protobuf.js의 현재 버전에 문제가있는 것 같지 않습니다.
오늘 같은 문제가 있습니다. 유사한 접근 방식을 보여주고 출력과 구성을 문서화하려면 아래에 답변을 추가하십시오. – Krispy