TransWikia.com

How to run JS files using NodeJS?

Mathematica Asked by hoon on April 12, 2021

I have installed NodeJS.

enter image description here

And I ran the comci.js file.
comci.js file URL ( http://naver.me/5MUV22Uj )

enter image description here

After that, I entered the command getTimeTable according to the format and executed it. However, the result of command execution is not displayed. What is wrong?

enter image description here

One Answer

You had defined your functions under module.exports, use this code:

ExternalEvaluate[session, "module.exports.getTimeTable(1,1,1)"]

or remove module.exports from .js file and use it directly:

ExternalEvaluate[session, "getTimeTable(1,1,1)"]

Answered by Ben Izd on April 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP