0

I just installed my project globally and I'm getting a windows script host error:

enter image description here

How do I fix this?

This is my javascript code.

Object.defineProperty(exports, "__esModule", { value: true }); //line 38

I am using typescript so this is a javascript build from the original typescript file. Line 38 is actually before the 1st line in the typescript file so it doesn't even exist in the original typescript file.

Thank you.

3
  • That is from you trying to execute a js file with the default Windows OS file association, which wont run it as a nodejs script Commented Jan 26, 2020 at 18:59
  • I am trying to run instapostwouter through my cmd prompt because I installed my project globally. Commented Jan 26, 2020 at 19:00
  • 1
    No, now it gives me the same error but with line 1 char 1, unknown character. I believe a shebang is not used in windows Commented Jan 26, 2020 at 19:05

1 Answer 1

0

If you have node installed, I think you can try execute your script file from command prompt, with something like:

node <YOUR_SCRIPT_PATH_AND_FILENAME_WITH_EXTENSION_HERE>

I've found this in Running JavaScript from the windows command prompt

Credits to user GOTO 0.

Hope it helps you.

Sign up to request clarification or add additional context in comments.

1 Comment

That would probably work but is not what I want. I want to be able to run the script by running instapostwouter in a commandprompt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.