Error running 'main.js': Program path not specified

Hi,

I'm new to WebStorm and received the following error while attempting to run a basic script.  I've downloaded nodejs and attempted to map to it as a possible solution but still received the error mentioned in the title.

Please assist.

Error:  Error running 'main.js': Program path not specified

Thanks,

15 comments
Comment actions Permalink

How do you run it? Did you specify a path to Node.js interpreter in Settings | Languages & Frameworks | Node.js and NPM?

0
Comment actions Permalink

Please attach screenshots of Settings | Languages & Frameworks | Node.js and NPM page and the error message.

 

0
Comment actions Permalink

This issue is different from your initial report, isn't it?

What does your .js file look like? Node interpreter fails to run it because it seems to include some invalid javascript - <script> tag

0
Comment actions Permalink
<script>
alert( 'Hello, world!' );
</script>
0
Comment actions Permalink

It's HTML, not JavaScript; even if you remove the HTML tags, you still won't be able to run this code with Node.js - alert() is only defined in browser.

Please change file extension from .js to .html and run it in browser using Run or Debug actions in file right-click menu

0
Comment actions Permalink

Hello!

I have same issue. I created file "Code.js" and try to write simplest code.

Also I read this article, but it doesn't make sense, what I am doing wrong.

0
Comment actions Permalink

Please attach a screenshot of your Code.js run configuration (Run > Edit configurations, expand Node.js node there)

0
Comment actions Permalink

Yes, it is. Node.js interpreter executable can't be found in your $PATH. Do you have it installed? Please specify a full path to it in the Node interpreter field.

I'd also recommend setting up interpreter in Settings | Languages & Frameworks | Node.js and NPM

1
Comment actions Permalink

It is this part from article in my first above message?

Downloading npm dependencies 

Before you start, install Node.js. If your application uses some tools, libraries, or frameworks, download the required packages.

0
Comment actions Permalink

It's work!

Thanks a lot, Elena!

1

Please sign in to leave a comment.