Go Premium for a chance to win a PS4. Enter to Win



Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi, I' need to select a specific node in an xml doc... i have this which gives me everything

For Each xmlNode In objXML.documentElement.selectNodes("Data")

but i need a single node and its related nodes that has a specific value.. please see the xml

for example: I need to select only the Data where Bookcode = NEA-CSOP

Thank you




Open in new window

Enhanced Intelligibility Without Cable Clutter
Enhanced Intelligibility Without Cable Clutter

Challenge: The ESA office in Brussels wanted a reliable audio conference system for video conferences. Their requirement - No participant must be left out from the conference and the audio quality must not be compromised.

As a C# developer, I am used to NHibernate and Entity Framework. What can a Node developer use to bring ORM functionality to Node?

In the past, with Node, I have only used SQL command embedded into the code, then executed. I'm am sure, even then, this was a worst practice.

What is the best practice way, using Node.js, to make use of an ORM?

(I am not sure if I am ready for a JSON database like MongoDB unless it helps you answer this question)

I am trying to install the following for a new application:
Firebase and Firestore
Firebase Hosting (probably)
Firebase Auth

I can get everything installed but there are dependency issues.  I think Node.js 9.0.0 does not work with NPM 5.5.1 and the Angular/cli.  Node.js 9 comes with NPM 5.5.1 so I'm not sure what the problem is.  I tried to update my package.json file with v. 5.5.1 from 5.0.0 but that causes even more issues.  I know this is all new but has anyone found a way to work around it?  Different versions?
I suddenly need to buy a new PC and have been doing Angular work on a MacBook.

It seems Windows PC are mainly  Windows 10.

What version of windows is needed to install Node? Angular? SQ Server and Visual Studio?

I want to make it easy to run my Angular app so it's easier to show the problem I am having. But I just noticed the repo contains tons of node packages, brining the size of this little Angular program (with two Components) to 172 MB.

I did not want to commit and push this without asking how Plunker works and what options I have regarding all those node modules.

I THINK I have a good installation of Node and Angular 4...here's why:

PS C:\dev\pp\src\app\components> ng -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / ? \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
@angular/cli: 1.4.5
node: 8.6.0
os: win32 x64
@angular/animations: 4.4.4
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.5
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.3.4
PS C:\dev\pp\src\app\components>

but I can not generate a new component.

PS C:\dev\pp\src\app\components> ng g component [canvas]
The command "generate" has an option without the required type and name fields.
Error: The command "generate" has an option without the required type and name fields.
    at Class.validateOption (C:\dev\pp\node_modules\@angular\cli\ember-cli\lib\models\command.js:377:13)
    at Array.map (<anonymous>)
    at Class.registerOptions (C:\dev\pp\node_modules\@angular\cli\ember-cli\lib\models\command.js:163:27)
    at getOptionsTask.run.then (C:\dev\pp\node_modules\@angular\cli\commands\generate.js:98:18)
    at …
Hello There

i am a VB.net programmer by trade.  But now I am  coding some javascript and am having a bit of trouble.  I am calling a function to get data from a mySql database and then formatting for display in the console.  Then under that, I want to put
a User entry prompt.  The problem is the User entry line is displaying first then the data.  

How can I get the mySql data to print to the console first and when done prompt the User for input? It "feels" like the sql statement is finishing after the prompt is displayed. So I need to make sure it finishes first.

Any ideas?

This is my hello.js file:

console.log(“Angular works on the Mac”);

I installed Angular, but an trying to verify it works. What's wrong here?

$ node hello.js
(function (exports, require, module, __filename, __dirname) { console.log(“Angular works on the Mac”);

SyntaxError: Invalid or unexpected token
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3
After running the following:

$sudo n stable

I got this version response for Node:

$ node -v

I then ran:

$npm install -g @angular/cli

but got permission errors which suggested I run the command  as root.
So, I tried:

$sudo su
(added my password)

$npm install -g @angular/cli
but get bad sounding warnings...

Node warnings
I killed the process, but need to get Angular installed. What can I do?

I get the following error when I try and start the server, whether I am root or have exited root:

sh-3.2# ng serve
    throw err;

Error: Cannot find module '@ngtools/json-schema'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/config/config.js:7:23)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

Is this an Old version of Node??
I get the following version:

sh-3.2# node -v

And what steps do I follow to check if it was installed with Homebrew?

Ans lastly, how do I update to latest version?

Choose an Exciting Career in Cybersecurity
Choose an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program was designed in collaboration with national intelligence organizations and IT industry leaders.

Hello All,

I get the following error as I try to read a certain node from the json below.  This alert gives the highlighted error:

"Cannot read property 'VendorBusinessType' of undefined"

  "Result": {
    "Contracts": [
        "Scope": {
          "Identification": {
            "PlanNumber": "8930-3o3pp"
          "Info": {
            "Title": "chjdj",
            "ProjectNumber": "PROJ123",
            "StationCode": "STATIONCD1",
            "ContractType": "Commodities",
            "ActionType": "chvj-PLAN"
          "Dates": {},
          "Financial": {
            "PlannedFunding": 20000
          "Status": {
            "PlanStatus": "Draft",
            "DateOfLastPlanStatusChange": "/Date(1393887495760-0000)/"
        "Solicit": {
          "Identification": {
            "SolicitationNumber": "svzst-11-Q-xxx"
          "Info": {
            "Title": "vchdsxx",
            "ProjectNumber": "PROJ123",
            "StationCode": "STATIONCD1",
            "ContractType": "Architecture/Engineering – Minor",
            "ActionType": "FSS-RFQ"
          "Dates": {
            "DateIssued": "/Date(1393826400000-0000)/" /*Mon Mar 03 2014 01:00:00 GMT-0500 (Eastern Standard Time)*/,
            "ResponseDueDate": "/Date(1394427600000-0000)/"
           /*Mon Mar 10 2014 01:00:00

Open in new window

In my Angular 4 application, I'm trying to get the data service I built to fetch https://jsonplaceholder.typicode.com/posts and use this data in my blog-search component that uses Angular Materials to create an autocomplete input.

My project without node_modules is attached. However I don't necessary need a solution from my project, I just need a solution. Thanks
We are facing issue in cluster. We have two nodes which are in Hyper V cluster. When my node fails, VM are not switching to other node. Today suddenly, my nodes went off and I could not access my ERP which is vm hosted on this node. I have checked logs found some rror related to network.Quoram drive is accessible. Kindly find the attached error log node in jpg format.

Product: Windows server 2012, Failover cluster
Hi Expert

we have around 20 of ESXI servers with around 400 VMs

we need to buy VEEAM

my question

we are going to backup to disk let us say to NFS or CIFS and we need also to backup to tapes

but what type of tape library we have to buy if we don't want to use fiber

can we backup from our ESXI server using  VEEAM to tape without any other server to work as storage node or something like this

can we avoid using fiber interface and fiber switches

kindly advice
My ISP is telling me that my IP address has been reported to them as sending out Phishing emails.  I have 15 locations all using the Comcast Metro E and outgoing internet is all on the same IP address.  How might I be able to find which node is infected?
I'm using this open source project https://github.com/squallooo/MT5
It is an app to play audio tracks that have individual tracks for each instrument. ie. there are individual MP3 tracks in a folder. The folder has the song name.

Currently, a dropdown is populated by the name of each folder, and when a song is selected it loads.
I want to change it to be .... I want to send a parameter to the page (eg. myapp.com/songs.html?songid=BarbaraAnn) when the page is loaded it will also load the song, so we will now bypass the dropdown.

I am new to NodeJS and JavaScript, but I can find my way round if someone can please point me in the right direction.
What technologies are best suited for the highest performance web services to handle the heaviest loads? Thousands (even millions) of transactions per second?

I know that Node.js can handle thousand(s) sessions on a single thread. And I do not know of any other technology which handle more than one session per thread. Am I right about that? Are there others that can do this also?

What about real-time programming as it relates to web-services. Is there such a thing?

And how about a few general words about hardware deployment? Having a central API call which distributes calls to hundreds of more specialized web servers? What about Caching for successive related calls?

And what about Machine Learning? Can algorithms be optimized by existing Machine Learning algorithms that reduce the average response times of the most heavily load web service?


great to learn on w3schools.com because code editor is provided and examples are short

is there another w3schools.com so I can become a better beginner
not looking for 500+ characters code samples where i create entire websites
I updated node and npm and now yo is not working. I installed it in many ways including sudo npm install -g yo.

It does install and runs the yo doctor. Everything checks out. But when I type yo doctor, it says

-bash: yo: command not found

Im wondering if it has to do with my path and node. I even tried to brew link node and have done many steps. Not sure what else to do so asking the experts!

Thank you all.
Has Powershell sent you back into the Stone Age?
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Hello All,

I am reading a book called express.js Blueprints.  I am trying to wrap my mind around understanding authentication using passport.  serializing and deserializing is not registering to me.  I have just started learning node and express js so that's a big reason why.

Here's a code from the book on setting up passport.  Starting with line 5, can someone please break down what's happening?  Where is the "user" parameter coming from in the serializeUser function?  Where did "user.id" come from?

var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var User = require('mongoose').model('User');

passport.serializeUser(function(user, done) {
done(null, user.id);
passport.deserializeUser(function(id, done) {
User.findById(id, done);

passport.use(new LocalStrategy(function(email, password, done) {
email: email
}, function(err, user) {
if (err) return done(err);
if (!user) {
return authFail(done);
if (!user.validPassword(password)) {
return authFail(done);
return done(null, user);

Open in new window

Hi Guys/Girls i'm having trouble with an exchange server, I am trying to upgrade to CU17.

Host is Server 2012R2

i have prepared AD via;

setup.exe /PrepareAD /IAcceptExchangeServerLicenseTerms
setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

then once running the setup for CU17 i get through all pre req checks etc, get too around 94% and the process hangs before Exchange will finally tell me upgrade has failed with this error;

Error occurreSystem.Exception: Failure configuring SearchFoundation through installconfig.ps1 - Error occurred while configuring Search Foundation for Exchange.System.TimeoutException: Timed out waiting for Admin node to be up and running

I have googled, until i can no longer google. Only references i see are firewall issues or permissions issue, none of which are a problem for me, firewall is off, and i am using full permissions.

I think the problem has something to do with my Exchange HostControllerService, It will start but stops immediately after, event viewer reports no problems in regards to it.

I Noticed OWA also will not search mail, So sure that these two problems are related, With search issues i normally expect database index state, but all is healthy.

im all out of things to try, was hoping for some advice. Cheers.
Hi everyone,
                      my tsm 6.4  backup is failing with the message: ANS0326E This node has exceeded its maximum number of mount points.

any idea or steps to solve this issue?

Thanks in advance.

I havecreated a node.js express app using pdfkit to create dynamic PDFs.  I need to set the color as a Spot color, or at least 100% Black using CMYK for my workflow purposes.

The documentation for pdfkit shows only hex values as possible (#00000, #ff0000, etc...).  Does anyone know if it is possible to set a CMYK or Spot color?
-------my code-----

import xml.dom
import xml.dom.minidom
doc = xml.dom.minidom.parseString('''
   <person id="01">
      <name> abc</name>
   <person id="02">
      <name> def</name>


def innerHtml(root):
    text = ''
    nodes = [ root ]
    while not nodes==[]:
        node = nodes.pop()
        if node.nodeType==xml.dom.Node.TEXT_NODE:
            text += node.wholeText
    return text

for statusNode in doc.getElementsByTagName('person'):
    for childNode in statusNode.childNodes:
        if childNode.nodeType==xml.dom.Node.ELEMENT_NODE:
            print("{}={}".format(childNode.nodeName, innerHtml(childNode)))

-------------output i got is------------------
name= abc
name= def

---------but expected output should be in tableformat-----
i need to get the person id attribute also...pls answer

person id         name         age      address
01                abc          32      addr123
02                def          44       addr456
Team, I need some help diagnosing this issue, asked by one of our DBA's, server is part of a cluster, the cluster was manually failed over to the other node around the time this issue/error occurred?
Login failed for user 'XXX\WINXXXX$'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: XX.XXX.XX.XX] - Any ideas where/how I diagnose what the issue is here?

Many thanks


Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

Top Experts In