Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Problem executing Node.JS code

29 views
Skip to first unread message

Slava Lishnevsky

unread,
Mar 19, 2025, 5:58:09 PMMar 19
to AutoControl Community Forum
Hello,

I am using OPEN FILE/PROGRAM action to run Node.js code.
I am calling it as such
218.jpg
start cmd /k node "D:\Projects\Twitter\index.js" <url>

The cmd window pops up, and this error message is displayed:
224.jpg

When I run this code locally, from VSCode or from a console, everything works fine, no errors.

Any idea why this is happening?


AutoControl support

unread,
Mar 20, 2025, 6:56:05 PMMar 20
to AutoControl Community Forum
Perhaps the issue is related to the current working directory not being what the script expects.
Please try creating a batch file replyToTweet.bat with this content:
CD /D "D:\Projects\Twitter"
node "replyToTweet.js" %1

Then, in the "OPEN FILE/PROGRAM" action you can execute the file like this:
start cmd /k "D:\Projects\Twitter\replyToTweet.bat" <url>

Please let us know if the issue persists.

Slava Lishnevsky

unread,
Mar 23, 2025, 10:47:07 AMMar 23
to AutoControl Community Forum
Great!
This worked.
Thank you!

Reply all
Reply to author
Forward
0 new messages