Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme example doesn't work #1

Open
pinggi opened this issue Jan 20, 2023 · 1 comment
Open

Readme example doesn't work #1

pinggi opened this issue Jan 20, 2023 · 1 comment

Comments

@pinggi
Copy link

pinggi commented Jan 20, 2023

node -v

v16.14.0
yarn add @pola-rs/browser

package.json

{
  "dependencies": {
    "@pola-rs/browser": "^0.0.1-alpha"
  },
  "type": "module",
  "scripts": {
    "start": "node index.js"
  }
}

index.js

import * as pl from "@pola-rs/browser"
const filepath = "https://raw.githubusercontent.com/pola-rs/polars/master/examples/datasets/foods2.csv"

let df = await pl.read_csv(filepath)

let lf = df.lazy();
df = await lf.collect()

console.table(df.head(10).to_records());

yarn start

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'C:\PolarsTest\node_modules\@pola-rs\browser\' imported from C:\PolarsTest\index.js
←[90m    at new NodeError (node:internal/errors:371:5)←[39m
←[90m    at legacyMainResolve (node:internal/modules/esm/resolve:336:9)←[39m
←[90m    at packageResolve (node:internal/modules/esm/resolve:917:14)←[39m
←[90m    at moduleResolve (node:internal/modules/esm/resolve:976:18)←[39m
←[90m    at defaultResolve (node:internal/modules/esm/resolve:1078:11)←[39m
←[90m    at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)←[39m
←[90m    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)←[39m
←[90m    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)←[39m
←[90m    at link (node:internal/modules/esm/module_job:78:36)←[39m {
  code: ←[32m'ERR_MODULE_NOT_FOUND'←[39m
@universalmind303
Copy link
Collaborator

This is specifically for browser. If you want to use node. Check out nodejs-polars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants