I’m working on a project using Deno, ReScript 12, Fresh, and i’m trying to add in rescript-edgedb.
ReScript is all happy and compiles just fine, it’s during runtime I get an error.
Here’s a snippet of the source code:
let client = Db.client
let res = await client->Db.insertMovie({ratingKey: "123"})
Which leads to this compiled JS being used from rescript-edgedb/src/EdgeDB.js
import * as Exn from "rescript/lib/es6/Exn.js";
import * as Edgedb from "edgedb";
import * as Primitive_option from "rescript/lib/es6/Primitive_option.js";
import * as Primitive_exceptions from "rescript/lib/es6/Primitive_exceptions.js";
The error:
error: Uncaught (in promise) TypeError: Unable to load /home/josh2/Dev/plex-movie-night/node_modules/.deno/rescript@11.1.4/node_modules/rescript/lib/es6/Primitive_option.js imported from file:///home/josh2/Dev/plex-movie-night/routes/api/login.js
Caused by:
No such file or directory (os error 2)
Looking inside of node_modules and that file does not exist. I also tried setting "external-stdlib" : "@rescript/std" and that also pointed to a file that did not exist.