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,

8 comments

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

0

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

 

0

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
<script>
alert( 'Hello, world!' );
</script>
0

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

Please sign in to leave a comment.