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

Unable to get property 'tcp' of undefined or null reference #139

Open
aashakabragithub opened this issue Jan 9, 2019 · 0 comments
Open

Comments

@aashakabragithub
Copy link

I followed few prerequisites steps from https://github.com/SAP/node-hdb/wiki/Develop-Chrome-Apps-for-SAP-HANA and also followed Readme.md from https://github.com/SAP/node-hdb

I will list down the steps here -

  1. npm install hdb
  2. npm install browserify
  3. npm install chrome-net
  4. node ./node_modules/browserify/bin/cmd.js -r buffer -r ./node_modules/hdb/lib:hdb -o ./hdb.js
    Step 4 so that hdb.js is created in root directory where my main.js (that contains connection code and query) and index.html are present.

Now my index.html has below scripts -

<script src="hdb.js"></script> <script src="main.js"></script>

And my main.js has below code--

var hdb = require('hdb');
var client = hdb.createClient({
host: HOSTNAME,
port: PORT,
user: DBUSER,
password: DBPASSWORD
});
client.connect(function (err) {
if (err) {
return console.error('Error:', err);
}
console.log(client.readyState); // connected
});

In above code, createClient works fine but when client.connect is called I am getting "Unable to get property 'tcp' of undefined or null reference" error in console.

Now for above error, when I referred https://github.com/SAP/node-hdb/wiki/Develop-Chrome-Apps-for-SAP-HANA, I could see they added an entry for tcp in manifest.json. But I am not developing chrome extension.

Can you please help, what am I missing here?

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

1 participant