I installed GridDB 5.7 and created a Node.js project:
mkdir griddb-node-test
cd griddb-node-test
npm init -y
npm install griddb-node
My code (test.js):
const griddb = require('griddb-node');
console.log(griddb);
Running node test.js produces:
Error: Cannot find module 'griddb-node'
Require stack:
- /var/lib/gridstore/griddb-node-test/test.js
I also tried npm install griddb-node but npm says:
npm ERR! code ENOVERSIONS
npm ERR! No versions available for griddb-node
What I want to know:
How can I properly install and import the GridDB Node.js client so that Node.js can require it without errors?
Environment:
WSL2 Ubuntu 22.04
Node.js: 16.x
GridDB: 5.7