Transpile issue

Post Reply
Mongoose
Newbie
Posts: 7
Joined: Fri Mar 24, 2023 4:30 pm

Transpile issue

Post by Mongoose »

Hi all

Trying to understand and learn node.js. While trying to create a script using typescript I am having an issue with the transpile command in the terminal - it is giving me this error. What am I doing wrong? Any help much appreciated.

PS C:\Users\switch\Scripts\Node.js\Test> SwitchScriptTool --transpile .
SwitchScriptTool : The term 'SwitchScriptTool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ SwitchScriptTool --transpile .
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (SwitchScriptTool:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Transpile issue

Post by jan_suhr »

It can't find it in the PATH variable.
You can write the full path to the SwitchScriptTool at the command or add the path to the PATH variable
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Mongoose
Newbie
Posts: 7
Joined: Fri Mar 24, 2023 4:30 pm

Re: Transpile issue

Post by Mongoose »

Thanks Jan

It has returned this information which is fine
Usage:
SwitchScriptTool --pack <PathToFolderToPack> <PathToResultFolder> [--password <Password>] [--verbose]
SwitchScriptTool --unpack <PathToSscriptToUnpack> <PathToResultFolder> [--password <Password>]
SwitchScriptTool --create <ScriptID> <PathToResultFolder> [--JavaScript]
The script ID may contain only letters (A-Z, a-z), digits, hyphens and underscores
SwitchScriptTool --generate-translations <PathToScriptFolder> <PathToResultFolder>
SwitchScriptTool --transpile <PathToScriptFolder>
SwitchScriptTool --list <PathToSscript>

When I then follow up with
C:\Users\switch\Desktop\SwitchFolder\Scripts\Folder>SwitchScriptTool --create StringSplitter .

I get this return message
'SwitchScriptTool' is not recognized as an internal or external command,
operable program or batch file.

I have tried a few ideas from the web but no joy. Would you have any idea what this issue is?
Mongoose
Newbie
Posts: 7
Joined: Fri Mar 24, 2023 4:30 pm

Re: Transpile issue

Post by Mongoose »

Hi

For anyone else that may have this issue was able to fix by editing the environment variables and adding the appropriate file path there.
jan_suhr
Advanced member
Posts: 592
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Transpile issue

Post by jan_suhr »

Have you tried it with this path:
C:\Program Files\Enfocus\Enfocus Switch\SwitchScriptTool\SwitchScriptTool --create StringSplitter "C:\Users\switch\Desktop\SwitchFolder\Scripts\Folder"

This should create a folder StringSplitter in C:\Users\switch\Desktop\SwitchFolder\Scripts\Folder and all the files you need to create the script.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Post Reply