Cant run flux queries on influx CLI

Hi,
I have recently started using influx DB and was trying out flux.
I have installed influx version 1.7.8

I have a database by name “primeInsights” and measurement “requests”. InfluxQL works fine however when I try flux, it always gives me an error.

from(bucket: “primeInsights/primeDefaultRp”)
|> range(start: -5m)
|> filter(fn: ® =>
r._measurement == “requests” )

The above query give me error:
Result: _result
Error: missing table ID

The error is the same no matter what I try in flux.
I got nothing from google search for this error except some internal issue - https://github.com/influxdata/flux/issues/628

Any pointers of where I am going wrong?

Thanks.

@mns, are sure that Flux is enabled? https://docs.influxdata.com/flux/v0.36/introduction/installation#sidebar

@scott thanks. Seems like though I had enabled it in the config file itself, I had not restarted the DB after that. The issue has been resolved after restarting the DB.