5

I had installed blackberry 10 required software.

Error: node cannot be found on the path. Aborting.

Manu Mahesh
  • 49
  • 1
  • 6

7 Answers7

3

I'm having the same problem. It works when I specify android but not when I specify blackberry10.

As pointed out by Ludivoc above, node is in my path. My command sequence is:

mydir>cordova create test com.example.test Test
mydir>cd test
mydir\test>cordova platform add android
mydir\test>cordova platform add blackberry10
[Error: node cannot be found in path. Aborting.
]
mydir\test>where node
C:\Program Files\nodejs\node.exe

I have also verified that the bbndk is in my path:

mydir\test>where blackberry-signer
C:\bbndk\host_10_1_0_238\win32\x86\usr\bin\blackberry-signer
C:\bbndk\host_10_1_0_238\win32\x86\usr\bin\blackberry-signer.bat

FWIW, I'm running Windows 7 Professional (64bit)

It seems to me that this problem is specific to the cordova scripts for blackberry10 and not to the node installation.

SOLVED: I've had some luck with this problem and there is an answer posted on my thread at http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/lt-img-gt-images-not-being-cached-in-BB10-Webworks-app/m-p/2649771/highlight/false#M41350. The thread actually discusses another problem, but I was able to get this one solved as well (I think:-)). Essentially, you have to make some edits to the init.bat file at C:\Users\.cordova\lib\blackberry10\cordova\3.1.0\bin

Paul Richter
  • 10,908
  • 10
  • 52
  • 85
Terry Wilkinson
  • 157
  • 1
  • 8
2

We had the same problem and managed to fix it.

The first problem "Error: node cannot be found on the path. Aborting." is related to a file called check_reqs.bat which can be found in the .cordova dir, normally situated in your users home eg. C:\Users\.cordova\lib\blackberry10\cordova\3.1.0\bin\check_reqs.bat

This script tries to check for some files using a variable called %CORDOVA_NODE% e.g.

if not exist "%CORDOVA_NODE%\node.exe" (

No matter what I do, this variable is NEVER set when I call cordova so I just set it by hand

SET %CORDOVA_NODE%=somepath_dont_use_quotes

You might also have to adjust %CORDOVA_BBTOOLS%, on one of our machines it worked, on one it didn't, I was NOT in the mood figuring out why.

The same CORDOVA_NODE issue has to be fixed in your build.bat situated at \platforms\blackberry10\cordova\build.bat

Last but not least we had a problem in packager.js. There is a logger used in there which gives an error whenever the packager tries to call it so we just put it under comments.

I know this is a little bit of a hack us the %CORDOVA variables should be taken from your system but as those paths shouldn't change we are h appy with the solution.

Michael Frank
  • 53
  • 1
  • 8
  • by following the above i am getting this error: [Error: An error occurred while building the blackberry10 project. [BUILD] Pop ulating application source ] – Manu Mahesh Oct 28 '13 at 11:11
  • The Populating application source error is related to the error in packager.js I was talking about, have you commented out the logger? – Michael Frank Oct 28 '13 at 12:26
2

Open the check_reqs.bat file under C:\Users.cordova\lib\blackberry10\cordova\3.1.0\bin\check_reqs.bat and:

replace %CORDOVA_NODE% with your path to nodejs, mine is C:\Program Files\nodejs.

Then repalce %CORDOVA_BBTOOLS% with the path the blackberry sdk, mine is: C:\bbndk\host_10_2_0_15\win32\x86\usr\bin.

Finally replace the last line "%CORDOVA_NODE%\node" "%~dp0\check_reqs.js" %* by "C:\Program Files\nodejs\node.exe" "%~dp0\check_reqs.js" %*

It works for me

Duc
  • 511
  • 1
  • 4
  • 18
0

I believe you would get this error if 1) you have not installed node.js or 2) you have installed node.js but not yet added it to your system path.

These two pages provide further detail that may be helpful:

http://cordova.apache.org/docs/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface

http://cordova.apache.org/docs/en/3.1.0/guide_platforms_blackberry10_index.md.html#BlackBerry%2010%20Platform%20Guide

If you install nodejs in the default location, it should be installed in a location that is already in the system path on MacOS

Rod Nolan
  • 23
  • 3
Rod Nolan
  • 71
  • 1
  • 2
0

i have updated cordova to 3.2.0,now everything is working fine in win7. Thank you all

Manu Mahesh
  • 49
  • 1
  • 6
0

Have u downloaded the Blackberry SDK. You have install the blackberry sdk manually from blackberry's website. only then u can use it in phonegap.

Himanshu Garg
  • 599
  • 9
  • 21
0

This error occurs in C:\Users\{username}\.cordova\lib\blackberry10\cordova\{version}\bin\init.bat

The fix for me was to add a new environment variable:

Name: CORDOVA_BBTOOLS

Value: C:\Program Files\BlackBerry\BB10 WebWorks SDK 2.2.0.15\cordova-blackberry\bin\dependencies\bb-tools\bin

Your path might not be the exact same. If you can't find it do a search for blackberry-nativepackager.bat and the folder that contains that is the directory you need to set as the value.

Community
  • 1
  • 1
David Sherret
  • 101,669
  • 28
  • 188
  • 178