데이터 저장소 버전 1.2.0Google 클라우드 데이터 저장소 - 나는 함수 내에서 라이브 및 테스트 버전의 새로운 데이터 저장소를 반환하는 데 사용이 코드입니다 정의되지 않은
의 특성 'createInsecure'를 읽을 수 없습니다 :
를const Datastore = require('@google-cloud/datastore')
...
let localDatastore = Datastore({
projectId: '<<replaced-project-id>>',
apiEndpoint: 'localhost:8081'
})
return isLive() ? Datastore() : localDatastore
는 둘 다 구글 앱 엔진에서이 오류 메시지가 나타날 때 로컬로 실행 :
TypeError: Cannot read property 'createInsecure' of undefined
at new Datastore (<removed path>/node_modules/@google-cloud/datastore/src/index.js:400:45)
at Datastore (<removed path>/node_modules/@google-cloud/datastore/src/index.js:366:12)
이것은 뿌려 줄 수 있습니다 : 그것은 내가 제거하기 전에 작동하는 것 같았다
this.options.sslCreds = grpc.credentials.createInsecure();
후 내 node_modules을 다시 설치했습니다.
이"@google-cloud/datastore": "^1.2.0",
"bluebird": "^3.4.7",
"joi": "^10.6.0",
"lodash": "^4.17.4",
"moment": "^2.17.1",
"shortid": "^2.2.6",
"ticketbuddy-library": "file:../ticketbuddy-library",
"uuid": "^3.0.1"
그러나, 또는 코드베이스에 내 package.json에 대한 변경 사항을 표시하지 않습니다 내 자식 역사는 새로운 데이터 저장소를 반환 :이 내 의존성이다.
이 오류가 발생하는 이유에 대한 도움을 주시면 대단히 감사하겠습니다.
이것은 Google 클라우드 데이터 저장소 라이브러리의 버그처럼 보입니다. GitHub 저장소에 문제를 제기하면 도움이된다고 생각합니다. – murgatroid99