gstore-node | Google Datastore Entities Modeling for Node.js | GCP library
kandi X-RAY | gstore-node Summary
kandi X-RAY | gstore-node Summary
Google Datastore Entities Modeling for Node.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gstore-node
gstore-node Key Features
gstore-node Examples and Code Snippets
Community Discussions
Trending Discussions on gstore-node
QUESTION
I have a Node.js Google cloud function which I now try to modularize into two js modules. It works fine locally on my machine but when trying to deploy to Google I get the following error:
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: npm ERR! @babel/cli not accessible from data-model
My main-function
is using my data-model
module via the following entry in package.json:
ANSWER
Answered 2022-Jan-11 at 15:37I finally managed to solve this, got a bit side-tracked by the babel/cli error message that CloudFunction threw.
The issue was that my data-model module was in another directory:
"data-model": "file:../../data-model",
I put it inside the main-function instead:
"data-model": "file:data-model",
and it works just fine to deploy to cloud functions.
Why it is so I have no clue but it is kind of documented in the Google Cloud Docs too:
The code for this local module should be stored somewhere other than the node_modules folder within your function's root directory.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gstore-node
Import gstore-node and @google-cloud/datastore and configure your project. For the information on how to configure @google-cloud/datastore read the docs here. After connecting gstore to the datastore, gstore has 2 aliases set up.
gstore.ds The @google/datastore instance. This means that you can access all the API of the Google library when needed.
gstore.transaction. Alias of the same google-cloud/datastore method
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page