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

Node package #21

Open
bbartley opened this issue Dec 14, 2022 · 2 comments
Open

Node package #21

bbartley opened this issue Dec 14, 2022 · 2 comments

Comments

@bbartley
Copy link

Would it be possible to deploy a node package?

I attempted to configure and build my own webpack, but so far have not been successful in transpiling a bundle (using ts-loader).

@jamesamcl
Copy link
Member

jamesamcl commented Dec 15, 2022

Hi Bryan, it should be in npm as sboljs with major version 3:

https://www.npmjs.com/package/sboljs

so npm install sboljs should get it

@bbartley
Copy link
Author

@udp I am having trouble integrating this package into my own projects. Can you provide any guidance for how to configure a node project to use sboljs?

When I attempt to import sboljs into a local node package, or when I attempt to require it into a simple js script, I get the following:

/Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js:4
const rdf_ext_1 = require("rdf-ext");
                  ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/bbartley/Dev/git/idt/node_modules/rdfoo/node_modules/rdf-ext/index.js from /Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js not supported.
Instead change the require of index.js in /Users/bbartley/Dev/git/idt/node_modules/rdfoo/dist/rdfoo/node.js to a dynamic import() which is available in all CommonJS modules.

I am not sure if the issue is just because I am a noob at js development, or if there is actually some incompatibility of modules in the dependency tree.

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