I have install both node.js and nforce. when i am using require('nforce') then phonegap project give error require is not defined. ?
var nforce = require('nforce');
Error :- 07-15 19:04:12.264 24690-24690/com.phonegap.testdemo I/chromium: [INFO:CONSOLE(11)] "Uncaught ReferenceError: require is not defined", source:file:///android_asset/www/index.html (11)
I have follow given below url for connect phonegap with salesforce.
You can't use "require" that way without additional effort. PhoneGap is not a server, so doing things like you would in Node aren't going to work.
Personally I use Browserify(Browserify ) to address this -- it packages dependencies and provides a node-like environment in the browser. Note that this will add a build step to your process.