diff --git a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java index d9a9e60916f10..c3bdce81a46b4 100644 --- a/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java +++ b/bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java @@ -14,6 +14,7 @@ import static org.openhab.core.automation.module.script.ScriptEngineFactory.*; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.channels.SeekableByteChannel; @@ -65,7 +66,7 @@ public class OpenhabGraalJSScriptEngine extends InvocationInterceptingScriptEngi private static final String GLOBAL_REQUIRE = "require(\"@jsscripting-globals\");"; private static final String REQUIRE_WRAPPER_NAME = "__wraprequire__"; // final CommonJS search path for our library - private static final Path LOCAL_NODE_PATH = Paths.get("/node_modules"); + private static final Path LOCAL_NODE_PATH = Paths.get(File.separator + "node_modules"); // these fields start as null because they are populated on first use private @NonNullByDefault({}) String engineIdentifier;