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,
Please sign in to leave a comment.
How do you run it? Did you specify a path to Node.js interpreter in Settings | Languages & Frameworks | Node.js and NPM?
Elena,
I did I followed the steps listed in the link below.
https://stackoverflow.com/questions/30495166/webstorm-ide-program-path-not-specified-when-running-js-script-how-can-i-fix-th
Please attach screenshots of Settings | Languages & Frameworks | Node.js and NPM page and the error message.
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
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
Thanks
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.
Please attach a screenshot of your Code.js run configuration (Run > Edit configurations, expand Node.js node there)
Is it?
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
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.
yes:)
It's work!
Thanks a lot, Elena!