Can`t execute Powershell scripts with child_process.spawn() #155
Replies: 2 comments
-
@AlexInCube I think the problem is that you are trying to load a script from snapshot, only the nodejs app has access to the snapshot that is a virtual FileSystem, you should instead firstly copy the script to a local directory and then run it from there |
Beta Was this translation helpful? Give feedback.
-
I already solve this problem. I am load script content with readFileSync and then provide this content to Powershell with argument "-Command {script content}" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My app works fine when i run it just with npm start. But I can`t execute Powershell scripts when i run my app from .exe

I have this error:
my package.json
My TypeScript code
Beta Was this translation helpful? Give feedback.
All reactions