Open akashKarmakar02 opened 1 month ago
var node = NodeJsRunTimeProvider.getRuntime();
node.getNodeModule(NodeModuleModule.class).setRequireRootDirectory(new File(JavetOSUtils.WORKING_DIRECTORY));
node.setV8ModuleResolver(new JavetBuiltInModuleResolver());
System.out.println(JavetOSUtils.WORKING_DIRECTORY);
node.getExecutor(output.getCode()).setModule(true).executeVoid();```
What am i doing wrong.
require()
doesn't involve the module resolver. Please read the doc.
i am using import React from "react" it is failing saying module not found but. const React = require("react") works
READ THE DOC.
In Javet i want to use module import but it is saying no module found but when i use require it pick the correct package from node_modules