Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing script RunApp: java.io.IOException: Cannot run program "npm" The system cannot find the file specified #1193

Closed
wangpengxpy opened this issue Aug 14, 2019 · 5 comments

Comments

@wangpengxpy
Copy link

for release 0.8.8 Hotfix 2 version.

I installed node locally and idea configures node plugin,the follow

image
image

but throw the following error
image

I don't know where the problem is. Is't a version issue for node?
thanks in advance

@jmiranda
Copy link
Member

It's probably not an NPM version issue but rather an issue with Windows. I'm not exactly sure how to solve it but here's a StackOverflow post that addresses the issue.
https://stackoverflow.com/questions/22708255/cannot-run-program-npm-in-directory

@jmiranda
Copy link
Member

Here's one that might also be helpful. Just be sure to research what it means to use the EnableExtensions feature. I don't want to open a security hole on your machine.
nodejs/help#379

@wangpengxpy
Copy link
Author

wangpengxpy commented Aug 15, 2019

@jmiranda thanks your reply quickly

According to the solution you provided
image

but when i view the EnableExetensions property for win 10,the default value is 1 ,no need to change.

image

What other ideas do you have for it?

@jmiranda
Copy link
Member

@wangpengxpy Sorry for not responding last week. I was working on a large issue that required most of my attention. I just noticed that you closed this ticket and wanted to make sure that you found a solution. If not, I can probably continue to investigate the issue tomorrow morning.

@wangpengxpy
Copy link
Author

wangpengxpy commented Aug 19, 2019

@jmiranda Hi,Thank you for taking the time to follow up on my problem.
The problem is that execute npm command in【_Events.groovy】the follow:

def command = """npm run bundle"""
def proc = cmd.execute()

It caused by npm command path not found,but according to the above mentioned by me,I have installed node correctly. finally, I temporarily modified the code below. it works

String[] cmd = ["C:/Program Files/nodejs/node.exe", "npm run bundle"] as String[];
def proc = cmd.execute()

Please investigate why the npm execution path cannot be found. i think other developers will encounter the same problems in the development environment.thks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants