Installing InfluxDB Node.js FAILS


I am fairly new to InfluxDB and I am trying to integrate Influx DB and Node JS server, So I can send datapoints from Node server to Influx DB and can monitor the traffic coming onto the server (via grafana etc).

Now, as I am trying this for the 1st time, I am stuck and not able to move forward with my setup.

Could anyone kindly assist / guide me to sort out my issue.

I have followed → docs influxdata com / influxdb / v2.6 / api-guide / client-libraries / nodejs

All the commands works in the above link, but the first one. Below screenshot for reference:

As per logs - I get “E404 Not Found - GET - Not found”.

Post which I am supposed to be running the data query on my InfluxDB (already created bucket NodeJS). for which I have followed the same link as above under Write.

But I get below error (which I am presuming is caused by E404, got in the installation step).

import { InfluxDB, Point } from ‘@influxdata/influxdb-client’

SyntaxError: Cannot use import statement outside a module

Request your assistance in sorting out the issue.


Hi, I’m getting exactly the same problem. Did you find a fix?