You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@universalmind303 I fail to import browser side, via a script invoked in index.html.
Steps to reproduce:
mkdir jspolars
cd jspolars
$ yarn add @pola-rs/browser
yarn add v1.22.21
info No lockfile found.
(node:63701) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ @pola-rs/[email protected]
info All dependencies
└─ @pola-rs/[email protected]
✨ Done in 1.78s.
import * as pl from "./node_modules/@pola-rs/browser"
let filepath = "https://raw.githubusercontent.com/pola-rs/polars/master/examples/datasets/foods2.csv"
let response = await fetch(filepath);
let responseTEXT = await response.text();
let df = await pl.readCSV(responseTEXT);
console.table(df)
Using import * as pl from "@pola-rs/browser" fails:
console.log:
```
localhost/:1 Uncaught TypeError: Failed to resolve module specifier "@pola-rs/browser".
Using `import * from "./node_modules/@pola-rs/browser"` fails:
console.log:
browser/:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
This just gives the directory listing.
No joy importing browser/browser.js either.
How should I do this? I'd like to integrate polars into a browser-side library suite. It does not have to be perfect at this juncture, for p.o.c., but hoping of course for further development.
thanks, George
The text was updated successfully, but these errors were encountered:
@universalmind303 I fail to import browser side, via a script invoked in index.html.
Steps to reproduce:
./index.html
./script.js
./start-http-server-8119.sh
Start the server:
Using
import * as pl from "@pola-rs/browser"
fails:console.log:
```
localhost/:1 Uncaught TypeError: Failed to resolve module specifier "@pola-rs/browser".
browser/:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
The text was updated successfully, but these errors were encountered: