This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271547

Summary: cordova 7.0.1 build failed Cannot run program cordova.cmd
Product: web Reporter: godav
Component: CordovaAssignee: Tomas Stupka <tstupka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: ide log

Description godav 2017-09-28 13:59:07 UTC
Created attachment 165200 [details]
ide log

Thats the error that i got while i try to build a cordova project. i just try to use the netbeans hello world project.

As much as i can understand the problem is that it cannot find the cordova.cmd. I checked the file manully in the folder its there and run only when i use as administrator. moreover i gave all the the directory full control privilege.  

also in project properties in cordova area when i pressed the create cordova resources i get the same errors. 

i have the following :
windows 10 64bit
java 1.8.0_144
cordova 7.0.1
node 6.11.3
npm 5.42

android_studio

don't know what is the problem please help me..

here is the error that i got :


ant -f C:\\ccc\\nbproject "-Dupdate.task.jar=C:\\Program Files\\NetBeans 8.2\\webcommon\\ant\\extra\\org-netbeans-modules-cordova-projectupdate.jar" -Dcordova.version=7.0.1-0.0.0 -Dandroid.project.activity=android -Dsite.root=www_nb_temp -Denv.DISPLAY=:0.0 -Dstart.file=index.html "-Dios.certificate.name=iPhone Developer" "-Dandroid.sdk.home=C:\\Program Files (x86)\\Android\\android-sdk" -Dconfig=android_1 -Dandroid.target.device.arg=run upgrade-to-cordova-project
check-cordova-project:
check-cordova-version:
upgrade-to-cordova-project:
cordova.cmd -d create C:\Users\aainouz\AppData\Local\Temp\/nb_temp_project com.coolappz.CordovaClubears CordovaClubears
C:\ccc\nbproject\build.xml:84: Execute failed: 
java.io.IOException: Cannot run program "C:\Users\aainouz\AppData\Roaming\npm\cordova.cmd" (in directory "C:\ccc"): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58)
	at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
	at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
	at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:629)
	at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:670)
	at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:496)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
	at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 22 more
BUILD FAILED (total time: 0 seconds)