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 Experts,

       I am working on an web application (wagtail cms) like django-cms, which is in aws ubuntu.  Its backend is postgres, with elastic search few modules reactjs and nodejs.
The application is deployed in docker containers.  uwsgi is the upstream server for nginx.

      I get lots of errors with npm build, i am not able to run the application.  sometimes ports are not accessible. postgres is using 5432, elasticsearch is 9200. react is rendering on 9009. I get lots of dependencies error.    At what situation I have to use dockers?  sometimes I get errors in nginx configuration. could please tell what is good practice for npm build, run deploy.  

    What is the best way to architect the development and test environment?

    Will I be able access the postgresql, elastic search and nginx in linux ubuntu on aws with cms source code and contents on windows local pc?   or having the copy of postgresql, elastic search, cms contents and nginx all on a windows pc as development environment environment.   Elastic search has huge data.  and how to deploy the application on dockers in linux environment.

    What is the best way to have a development environment?  what is best test environment

   could you please tell me on how elastic search data is stored on postgres and what is network host setting in elastic search how it accessed from outside application.

    Could you please throw light on how to create development and test environment.

with …
Turn Raw Data into a Real Career
Turn Raw Data into a Real Career

There’s a growing demand for qualified analysts who can make sense of Big Data. With an MS in Data Analytics, you can become the data mining, management, mapping, and munging expert that today’s leading corporations desperately need.

I am having an Angular build error.  This is the error I get.

ERROR in Error during template compile of 'AppModule'
  Function expressions are not supported in decorators in 'ɵ0'
    'ɵ0' contains the error at app\app.module.ts(35,23)
      Consider changing the function expression into an exported function.

Here is my app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormioAppConfig } from 'angular-formio';
import { FormioAuthService, FormioAuthConfig } from 'angular-formio/auth';
import { AuthConfig, AppConfig } from '../config';
import { AuthModule } from './auth/auth.module';

import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { HeaderComponent } from './header/header.component';
import { ApplicationModule } from './application/application.module';

  declarations: [
  imports: [
        path: '',
        redirectTo: '/home',
        pathMatch: 'full'
        path: 'home',
        component: HomeComponent
        path: 'auth',
        loadChildren: () => AuthModule
        path: 'application',
        loadChildren: () => ApplicationModule
  providers: [

Open in new window

How can I remove an xml node from an XmlDocument object in c#?  For example, I want to remove <LastName> tag.....


Open in new window

Desired Result:


Open in new window

I'm using .NET Framework 3.5
I am using xml. query on the following xml

This node is the child of /PCRDATA/Activity
        <EnteredBy ID="586807">XXXXXXXXXX</EnteredBy>
        <MedicationDosageUnit ID="2835">MG</MedicationDosageUnit>
        <MedicationName ID="92">Ketamine</MedicationName>
        <MedicationRoute ID="2">IV - Push</MedicationRoute>
        <Procedure ID="Medication">Medication</Procedure>
        <ProcedureResponse ID="2">Unchanged</ProcedureResponse>
        <Comments>Ketamine, 100 MG via IV - Push given by xxxxxxxxxxxxxxxxxxxxxx). Pt. Response: Unchanged. </Comments>

Open in new window

my query is as follows

value of @MedicationNameID1="92"

exec( 'declare @xml xml 
set @xml=(
@xml.query(''/PCRDATA/General/Outcome[@ID="'+@Disposition+'"]'').value(''.'', ''varchar(50)'') as DispDesc,
@xml.query(''/PCRDATA/General/DispatchedAs[@ID="'+@Nature+'"]'').value(''.'', ''varchar(50)'') as NatureDesc ,
@xml.query(''/PCRDATA/General/MedicalCategory[@ID="'+@MedCat+'"]'').value(''.'', ''varchar(50)'') as MedCatDesc,
@xml.query(''/PCRDATA/Actvity/Procedures/Procedure[1]/MedicationName[@ID="'+@MedicationNameID1+'"]'').value(''.'', ''varchar(50)'') as MedicationName1
' )

Open in new window

The value of MedicationName1 is blank.  I am expecting ketamine

Can someone point me in the right direction,  I am baffled.

Thank you
Hello. I am working on a node application.  I'm trying to use Passport for the log in.   I found an example online of what I want to do.  However I cannot get it to work.  I am running into an issue with my routes.  I get a compiler error that I have not seen before.  I tried to attached the project to this question, but it won't accept zip files so I will just attach my index.js and AuthController.js.  This is the error I get on index.js when it tries to do my first route.
var auth = require("../controllers/AuthController.js");

// restrict index for logged in user only
router.get('/', auth.home);

Open in new window

I get this error:  
throw new mongoose.Error.OverwriteModelError(name);
OverwriteModelError: Cannot overwrite `User` model once compiled.
at MongooseError.OverwriteModelError (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\node_modules\mongoose\lib\error\overwriteModel.js:18:11)
    at Mongoose.model (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\node_modules\mongoose\lib\index.js:349:13)
    at Object.<anonymous> (C:\Users\ernest\Documents\coding bootcamp\code\Passport MongoDB\node-passport-auth\models\user.js:12:27)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require …
How do we have a completely clean DEV environment to write an application in Node / Angular / Bootstrap / ...? I am having trouble with CLI's and updates each time. Does anyone have a real Best Practice? I would like to take an environment that I have been hacking around in and clean it up, ready for a new project easily.  Ideally, I would love to see a script to run that will clean it all up in one shot.
I would like to have a list of all backup / archive of a node with its size.
I have a 30-day retention, I should have a list with the last 30 backup / archive done and their size
We have 2 servers in a DAG and the network to the passive mode is down and I need to stop the dag replication from the active node to the passive but it wont allow me since the network to the passive node is down.
How can I stop the active server from trying to replicate to the passive node until the network to it is back on line?
How  can  I   run  NPM  commands behind a company  corporate proxy server?I tried to google online with no  success.
npm config set proxy
npm config set https-proxy
I've created a custom API for internal use and have query strings used to find specific assets - http://localhost:3000/api/asset?ipaddress= ... returns 1 device

What I would like to do is return results for all devices with the ip address that contains the substring in the query string - http://localhost:3000/api/asset?ipaddress=10.1.1 ... returns all devices within this subnet. Right now, this returns 0 devices.

Here's the structure of my router(s) -

router.get('/', verifyToken, function (req, res) {
    const query = {};

        query.clientcode = req.query.clientcode;
        query.assetkey = req.query.assetkey;
    if( =;
        query.siteid = req.query.siteid;
        query.ipaddress = req.query.ipaddress;

    asset.find(query,function(err, results) {
        return res.json(results);

Open in new window

Free tool for managing users' photos in Office 365
Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

I found a health alert on our small S2D cluster saying there was not enough reserve capacity on the Cluster.  We have a two node storage spaces direct cluster with 4 1.6TB SSD's per server for a total of  about 11gigs total when I set up the cluster for mirrored pool there was only about 6gig usable which I split between the two servers I have two 2.7gig CSV's one has 915GB free the other has 1.95TB free. Does anyone know what I am missing here?


can someone know how to configure DAG on 3 exchange server that work on node majority method ?
the configuration look very simple but is`t request from me  to enter witness server   and  i know that in node majority method
the witness server is not necessary .
there is any way to bypass this request and create the DAG without witness server ?
and if i create it with witness server on node majority method  which data will be save/create  on the witness server
and were i should create the witness  is this situation?
Hi experts,

I'm did the basic angular example at this link.

So I installed node 8.9.3  and npm.

In my windows 10 command prompt after i installed node and npm...

if I type the following
>node --version

I get this: v8.9.3

if I type the following
>npm --version

I get this 5.5.1

So then using angular cli I created the angular example from the link above.

After I created the example in the link above, my directory looks like this:

So when I serve the project using this command

>ng serve --open

The app runs fine and looks like this when the browser launches

app run

After I ran the app, then in the command prompt I typed in this command to see the angular CLI version:

> ng --version

When I run that command I get this:


So I'm assuming the sample project I just created above is an Angular 5.1.2 project.

When creating the project with Angular CLI,
is there a command that lets you input whether you want to create an Angular 2 project or Angular 4 project or Angular 5 project?
I am a beginner to react. While setting up the installation and loading up all the dependencies, I finally run the
 npm start

Open in new window

command but this generates the error ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\Users\me\Documents\React\react-playlist' I have performed all the installation steps correctly. I have also attached the screenshot of the project folder. I also got webpack installed globally v 3.10.0 but that also didn't work. I also tried by inserting resolve loaders code in package.json file but that also didn't work. Here is the error picture.

P.S.: I'm following this tutorial

Below is the code of my project.

Package.json file:

  "name": "react-playlist",
  "version": "1.0.0",
  "description": "All the course files for the Net Ninja React tutorial playlist on YouTube",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "npm run build",
    "build": "webpack -d && webpack-dev-server --content-base src/ --inline --hot --port 1234"
  "repository": {
    "type": "git",
    "url": "git+"
  "author": "me",
  "license": "MIT",
  "bugs": {

Open in new window


I would like to learn React Native and I have seen various tutorials including this one


There are 2 guides: the quick start and the building projects with native code. The quick start uses Create React Native App  and the other one requires you to install all the dependencies: Node, the React Native command line interface, Python2, a JDK, and Android Studio.

Would you advise the  Create React Native App as a quick way to get started or is it better to do the full set up? I have not used react native so I am guessing if I want a quick intro to it I could use  Create React Native App and then if I find I use it then do the full set up? I'm also wondering  if I use Create React Native App as a quick way to get started will I learn unhelpful idiosyncrasies of that tool that I will need to unlearn or is it better to start with the 'full' set up.

The link to get Create React Native App is and I have been advised in another question to use for Node

I dont have a specific use in mind for react native but it is a technology that seems to be growing that I know nothing about so I would like to find out a bit about it. I have been told it is 'the future' for phone apps. I write games in javascript that run in web pages on a pc but would like to move to games on phones and tablets with …

I am learning node and the node package manager. I understand the npm is to install libraries and packages etc. I understand node.js runtime is what will execute the javascript code but in the tutorial I am following it says to do this

npm install -g npm

This is installing the npm package according to the guide. What is the npm package?

Ive read these pages:

The first page gives common packages which people install, one of which is npm, a javascript package manager

I thought i had already installed the node package manager with node? Please can you explain the difference between the npm command line tool and the npm package you install with it?

Many thanks
I am developing an app with Electron and need to display a message box to the user. This is the code I have:

const   electron = require('electron')
const   dialog = electron.dialog

        dialog.showMessageBox(BrowserWindow, {
            type: "info",
            buttons: ["OK", "Cancel"],
            title: "Importer Finished",
            message: "All done",
            detail: "Open you imported project in the IDE"
        }, resp => {


Open in new window

The message box displayed does not follow the options, see the attached snippet.

I hope someone can point me in the right direction to fix this, thanks,
Over the last few weeks I have been building and testing a two node S2D cluster I am just about finished with it but I have a question about CSV disk ownership when you run the VM fleet each node is assigned a CSV for the VMFleet storage if you reboot a node that nodes CSV moves ownership to the other node when the VM Fleet is run again the node with all the disk ownership runs at a higher load then other.  My question is two fold the CSV ownership does not move back when I unpause the node is this correct will I have to move the disk manually back to the correct owner every reboot? Second part is the assignment of the CSV previously I only had one due to the storage being provided by a 3rd server to the two nodes.  So If I want the best performance I should evenly split the storage and give each node a CSV and just put half of the VM's on one disk and the other half on the second CSV?
Hi everyone,
Does anyone know how to preserve snapshot tags in AWS. This node.js function moves the snapshots to another region but does not preserve tags so it becomes difficult to identify which server the snapshot belonged to.
If I cannot preserve tags, I would like to know how to tag a snapshot using the javascript code below. Example Key:DeleteOn Value [currentdate]
I found this code snippet that may be of help:

 // Add tags to the instance
   params = {Resources: [instanceId], Tags: [
         Key: 'DeleteOn',
         Value: 'current date as 2017-12-05'
   ec2.createTags(params, function(err) {
      console.log("Tagging instance", err ? "failure" : "success");
//define variables
var sourceRegion = 'us-east-1';
var destinationRegion = 'us-east-2';
var AWS = require('aws-sdk');
console.log ('Loading function');

//main function
exports.handler = (event, context, callback) => {

    //Get the EBS snapshot ID from Cloudwatch event details
    var snapshotArn = event.detail.snapshot_id.split('/');
    const snapshotId = snapshotArn['1'];
    const description = 'Snapshot copy from ${snapshotId} in ${sourceRegion}';
    console.log ("snapshotId:", snapshotId);

    //Load EC2 class and update the configuration to use destination
    AWS.config.update({region: destinationRegion});
    var ec2 = new 

Open in new window

IT Degree with Certifications Included
IT Degree with Certifications Included

Aspire to become a network administrator, network security analyst, or computer and information systems manager? Make the most of your experience as an IT professional by earning your B.S. in Network Operations and Security.

Hello Everyone

I am a recently converted developer taking a Full Stack Web developer Boot Camp.  It is moving very fast and we are seeing quite a bit of information/technologies.  I am having a bit of trouble where they all fit together in the diagram.  

First we did HTML/CSS. Then added javascript.  Then moved the javascript to server side.  Then Node, Express, Sequelize. ORM, MVC, React/Yarn, Firebase, Mysql, Mongo.

Is there any kind of diagram that could help me understand how all of this relates together?

If you look at the Orography tab in the attached file there is a graph. The blue line represents a hill or ridge. The dots represent the position of a scaffold on the hill. On the left is the upwind side and there is an orange line. If the scaffold is above this line then it is affected by the terrain and a set of equations need to be checked. I want to shade above the line. On the right is the downwind side. I want to shade below the grey line down to blue. I can introduce dummy nodes to place a node on the blue line directly under the grey line node. I can do the same the other side at 0,900. I cannot find how to shade these areas?
Angular: 5.0.1 / Angular CLI: 1.5.0 / Node: 8.9.1 / npm: 5.5.1 / Os: win32 x64

I get the below error when executing "npm start" in the terminal/command prompt. Can anyone help me resolve this? I have spent a whole day trying to fix it with no luck.

Here is the scripts section of my package.json

"scripts": {
    "start": "webpack-dev-server --inline --progress --port 8080"

Here is the error

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli
'start' ] 2 info using npm@5.5.1 3 info using node@v8.9.1 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle angular-io-example@1.0.0~prestart: angular-io-example@1.0.0 6 info lifecycle angular-io-example@1.0.0~start: angular-io-example@1.0.0 7 verbose lifecycle angular-io-example@1.0.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle angular-io-example@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\cbonsu\Downloads\sample_pro\webpack\node_modules.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program …
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

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?


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