You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using bytenode, this is a reallly great stuff for protection your code, but i have a problem, the problem is that i can't compile my source project with worker_threads. If i compile it, when i run my project i get this error:
TypeError [ERR_WORKER_UNSUPPORTED_EXTENSION]: The worker script extension must be ".js" or ".mjs". Received ".jsc"
How can I solve the error?
Great thanks in advance.
The text was updated successfully, but these errors were encountered:
Right now, you cannot compile the worker script that will be sent to the new Worker(filename) function. The API now has "Stability: 1 - Experimental" index, so it's better to wait before working on a fix.
However, you can still protect your software logic. Maybe like this:
'use strict';constbytenode=require('bytenode');const{ Worker, isMainThread }=require('worker_threads');if(isMainThread){console.log('Inside the main thread..');newWorker(__filename);// here too you can require some protected '.jsc' files}else{console.log('Inside the worker..');console.log(isMainThread);require('./protected-script.jsc');}
Hi, I'm using bytenode, this is a reallly great stuff for protection your code, but i have a problem, the problem is that i can't compile my source project with worker_threads. If i compile it, when i run my project i get this error:
How can I solve the error?
Great thanks in advance.
The text was updated successfully, but these errors were encountered: