Manu Mahesh
Manu Mahesh

Reputation: 49

Adding blackberry10 platform in cordova(3.0.0) is showing "Error: node cannot be found on the path. Aborting"

I had installed blackberry 10 required software.

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

Upvotes: 5

Views: 2705

Answers (7)

Terry Wilkinson
Terry Wilkinson

Reputation: 157

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

Upvotes: 3

David Sherret
David Sherret

Reputation: 106650

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.

Upvotes: 0

Himanshu Garg
Himanshu Garg

Reputation: 599

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.

Upvotes: 0

Manu Mahesh
Manu Mahesh

Reputation: 49

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

Upvotes: 0

Duc
Duc

Reputation: 501

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

Upvotes: 2

Michael Frank
Michael Frank

Reputation: 53

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.

Upvotes: 2

Rod Nolan
Rod Nolan

Reputation: 163

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

Upvotes: 0

Related Questions