Hi! 👋
Firstly, thanks for your work on this project! 🙂
I use ldo version 1.0.0-alpha 51 with cjs modules.
I get a run-time error at this line, when calling jsonldDatasetProxy:
|
const proxyBuilder = jsonldDatasetProxy(this, shapeType.context); |
This is the error:
_ldo_jsonld_dataset_proxy.default is not a function
The error is caused by the __toESM helper, in the cjs compiled code, that substitues in the exported structure the default member by the full package.
Not sure the bug is in the source code or in the compilation.
But using a named import instead of the default import at
|
import jsonldDatasetProxy from "@ldo/jsonld-dataset-proxy"; |
will probably solve the problem.
In the mean time see the patch here below.
Today I used patch-package to patch @ldo/ldo@1.0.0-alpha.51 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@ldo/ldo/dist/LdoDataset.cjs b/node_modules/@ldo/ldo/dist/LdoDataset.cjs
index 1a1d82d..47be7cd 100644
--- a/node_modules/@ldo/ldo/dist/LdoDataset.cjs
+++ b/node_modules/@ldo/ldo/dist/LdoDataset.cjs
@@ -3,7 +3,7 @@ const require_LdoBuilder = require("./LdoBuilder.cjs");
const require_LdoTransactionDataset = require("./LdoTransactionDataset.cjs");
let _ldo_subscribable_dataset = require("@ldo/subscribable-dataset");
let _ldo_jsonld_dataset_proxy = require("@ldo/jsonld-dataset-proxy");
-_ldo_jsonld_dataset_proxy = require_runtime.__toESM(_ldo_jsonld_dataset_proxy, 1);
+//_ldo_jsonld_dataset_proxy = require_runtime.__toESM(_ldo_jsonld_dataset_proxy, 1);
//#region src/LdoDataset.ts
/**
* @category Getting an LdoDataset
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
I use ldo version 1.0.0-alpha 51 with cjs modules.
I get a run-time error at this line, when calling
jsonldDatasetProxy:ldo/packages/ldo/src/LdoDataset.ts
Line 40 in f68a842
This is the error:
The error is caused by the
__toESMhelper, in the cjs compiled code, that substitues in the exported structure thedefaultmember by the full package.Not sure the bug is in the source code or in the compilation.
But using a named import instead of the default import at
ldo/packages/ldo/src/LdoDataset.ts
Line 2 in f68a842
In the mean time see the patch here below.
Today I used patch-package to patch
@ldo/ldo@1.0.0-alpha.51for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.