JavaScript ORA-12514 error while using node oracle-db npm packagae 12514 error in oracle

Currently, I am working on a project which requires the backend to be done in oracle. I used the given link and installed the node-oracledb using npm on my mac. My file contents are as follows

var oracledb = require('oracledb');

oracledb.getConnection(
{
user          : 'username',
password      : 'password',
connectString : 'username/password//hostname:port/sid'
function(err, connection)
{
if (err) {
  console.error(err.message);
  return;
}else{
    connection.execute(
  "SELECT * from TableName",
  function(err, result)
  {
    if (err) { console.error(err); return; }
    console.log(result.rows);
  });
 }
});

When I run node filename.js I get the following error

ORA-12154: TNS:could not resolve the connect identifier specified

I am using node version is v7.0.0 and npm version is v3.10.8. Also my oracle database is a 11g instance on the cloud. Can somebody let me know as to what am I doing wrong?

Answer:1

As the title of my question may be sufficiently understandable, I'll explain anyway. I'm working on a personal project with Electron, and I'm facing a frustrating issue which is : I'd like to ...

As the title of my question may be sufficiently understandable, I'll explain anyway. I'm working on a personal project with Electron, and I'm facing a frustrating issue which is : I'd like to ...

  1. electron create window from renderer
  2. electron create window fullscreen
  3. electron create window maximized
  4. electron create window
  5. electron create windows installer
  6. electron create windows executable
  7. electron create windows service
  8. electron create windows exe
  9. electron create windows package
  10. electron create new window
  11. electron create child window
  12. electron create browser window
  13. electron create hidden window
  14. electron create modal window
  15. electron create new window on click
  16. electron create second window
  17. electron js create window
  18. electron create another window
  19. electron create sub window
  20. electron create multiple windows

I am trying to make campaigns for my Cordova app. I am using this plugins: https://github.com/Anu2g/google-analytics-plugin.git Which have support for campaigns https://github.com/8zrealestate/...

I am trying to make campaigns for my Cordova app. I am using this plugins: https://github.com/Anu2g/google-analytics-plugin.git Which have support for campaigns https://github.com/8zrealestate/...

I have a GeoJSON dataset which has points and polygons. I have a simple Leaflet code which reads them into a map, like this: var MyLayer = new L.GeoJSON.AJAX("/UrbanSyntax/Desarrollo/twitter /data/...

I have a GeoJSON dataset which has points and polygons. I have a simple Leaflet code which reads them into a map, like this: var MyLayer = new L.GeoJSON.AJAX("/UrbanSyntax/Desarrollo/twitter /data/...

  1. geojson convert polygon to linestring
  2. geojson convert polygon to point
  3. convert geojson to polygon
  4. convert multipolygon to polygon geojson
  5. leaflet convert geojson to polygon

I am trying to create a D3 sunburst chart based on this example: https://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099 I'd like the arcs created to close the full circle but they don't. ...

I am trying to create a D3 sunburst chart based on this example: https://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099 I'd like the arcs created to close the full circle but they don't. ...