dyedgreen / deno-sqlite

Deno SQLite module
https://deno.land/x/sqlite
MIT License
409 stars 36 forks source link

error: trailing characters at line 23 column 2 at https://deno.land/x/sqlite@v2.3.1/build/sqlite.js:1:0 #98

Closed sntg-p closed 3 years ago

sntg-p commented 3 years ago

I'm trying to run a project that uses eveningkid/denodb, which in turn uses this library and Deno is throwing this error when trying to cache the dependencies:

error: trailing characters at line 23 column 2 at https://deno.land/x/sqlite@v2.3.1/build/sqlite.js:1:0

This only seems to be happening in Windows, I've tried Deno 1.4.2 and 1.6.0.

dyedgreen commented 3 years ago

Thank you for reporting the issue @sntg-p!

This seems like an issue with Deno (you mention windows, have you tried another OS?). Could you provide a minimal working example to reproduce the error (ideally only using SQLite directly, not through denodb, so that it becomes easier to track down what causes the issue).

I'd be interested to see if there is something we can do to make it work, or if we should raise this issue with Deno directly πŸ˜…

(this file is a fairly big file, which might be related to the issue, but without a reproducible example it's hard to know)

sntg-p commented 3 years ago

Just by importing the library in a .ts file

import * as sqlite from "https://deno.land/x/sqlite@v2.3.1/mod.ts";

and running that from Deno (tested 1.4.2, 1.6.0 and 1.6.1), it fails with the error in the original post. Tried from the command prompt, PowerShell and bash (mingw), on Windows 10 (1809).

dyedgreen commented 3 years ago

Hm, I can't seem to repro this with either v2.3.1 nor v2.3.2 (on macOS). You said you experienced the issue on Windows, have you tried the same under linux (e.g. using WSL, since you're on Windows)? πŸ˜…

If the issue persists, I think we should raise this in the deno repository directly.

jeremyBanks commented 3 years ago

I haven't been able to reproduce this.

Tested on Windows 10.0.19041 Pro in PowerShell in Windows Terminal 1.4.3243.0, with the latest two releases of the library (2.3.1, 2.3.2) and with the latest two versions of Deno (1.6.0, 1.6.1). Sample output:

PS C:\Users\_> deno --version
deno 1.6.0 (release, x86_64-pc-windows-msvc)
v8 8.8.278.2
typescript 4.1.2

PS C:\Users\_> deno run --reload test.ts
Download https://deno.land/x/sqlite@v2.3.2/mod.ts
Download https://deno.land/x/sqlite@v2.3.1/mod.ts
Download https://deno.land/x/sqlite@v2.3.1/src/constants.ts
Download https://deno.land/x/sqlite@v2.3.1/src/db.ts
Download https://deno.land/x/sqlite@v2.3.1/src/rows.ts
Download https://deno.land/x/sqlite@v2.3.1/build/sqlite.js
Download https://deno.land/x/sqlite@v2.3.1/src/wasm.ts
Download https://deno.land/x/sqlite@v2.3.1/src/error.ts
Download https://deno.land/x/sqlite@v2.3.1/src/row_objects.ts
Download https://deno.land/x/sqlite@v2.3.2/src/rows.ts
Download https://deno.land/x/sqlite@v2.3.2/src/db.ts
Download https://deno.land/x/sqlite@v2.3.2/src/constants.ts
Download https://deno.land/x/sqlite@v2.3.1/build/vfs.js
Download https://deno.land/x/sqlite@v2.3.2/src/wasm.ts
Download https://deno.land/x/sqlite@v2.3.2/src/error.ts
Download https://deno.land/x/sqlite@v2.3.2/src/row_objects.ts
Download https://deno.land/x/sqlite@v2.3.2/build/sqlite.js
Download https://deno.land/x/sqlite@v2.3.2/build/vfs.js
Check file:///C:/Users/_/test.ts
[Function: DB] [Function: DB]

PS C:\Users\_> type test.ts
import * as sqlite1 from "https://deno.land/x/sqlite@v2.3.1/mod.ts";
import * as sqlite2 from "https://deno.land/x/sqlite@v2.3.2/mod.ts";

console.log(sqlite1.DB, sqlite2.DB);
dyedgreen commented 3 years ago

Hm. Could it be a problem with insufficient free storage on your side @sntg-p ? (Seeing that @jeremyBanks cant repro it πŸ˜…)

sntg-p commented 3 years ago

I have almost 24GB left, I don't know what else could I test. :/

El jue, 17 de dic. de 2020 a la(s) 06:32, Tilman Roeder ( notifications@github.com) escribiΓ³:

Hm. Could it be a problem with insufficient free storage on your side @sntg-p https://github.com/sntg-p ? (Seeing that @jeremyBanks https://github.com/jeremyBanks cant repro it πŸ˜…)

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dyedgreen/deno-sqlite/issues/98#issuecomment-747323143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3HHOL775B3ZM5LB545R6TSVHF2RANCNFSM4UZISZCA .

dyedgreen commented 3 years ago

Closing since unable to reproduce πŸ™