Skip to content

Does ClearScript allow the use of node modules like JSDOM ? #486

Discussion options

You must be logged in to vote

Hello @nikhil-archerirm,

I am trying to find out if I can evaluate something like require('jsdom') or an equivalent syntax which will pull in JSDOM and all its dependencies.

Not without a lot of work, unfortunately. Like many JavaScript libraries, jsdom seems to be closely tied to Node.js, depending not only on elements of the Node.js API but also on its support of the node_modules directory structure and package.json manifest format.

ClearScript on the other hand provides only a standard JavaScript environment. It supports ES6 and CommonJS modules but no Node.js-specific functionality.

Sorry!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikhil-archerirm
Comment options

Answer selected by nikhil-archerirm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants