mechatroner / RBQL

🦜RBQL - Rainbow Query Language: SQL-like query engine for (not only) CSV file processing. Supports SQL queries with Python and JavaScript expressions.
https://rbql.org
MIT License
281 stars 13 forks source link

error in Node.js docu on www.npmjs.com #37

Closed WhiteG00se closed 2 years ago

WhiteG00se commented 2 years ago

Hello there,

in the docu on https://www.npmjs.com/package/rbql/v/0.25.0 there is a code snipped with the heading 'Example of query_csv() usage'.

In there, it says

const rbql_csv = require('rbql_csv')
[...]
rbql_csv.query_csv([...])

But trying this just gives me

Error: Cannot find module 'rbql_csv'

I tested the following and it works, so perhaps edit this docu:

const rbql_csv = require('rbql_csv')
[...]
rbql_csv.query_csv([...])

BR Tobias

mechatroner commented 2 years ago

Thank you for pointing this out! The root cause actually is the completely wrong structure of the javascript package - it doesn't have neither "main" nor "browser" entries and the index.js file is also not there. I will need to figure out how to properly fix this.

mechatroner commented 2 years ago

Sorry, I looked at it again and realized that it does actually have index.js file, and the correct sample should look like this:

const rbql = require('rbql')
[...]
rbql.query_csv([...])

-- I guess this is what you meant in the original message :smile:

So I only updated the docs and also moved package.json and index.js into RBQL repository so that all of the npm module code is kept here instead of the obscure private repository which I used before for publishing the module to npm.