Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium



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

How  can  I   run  NPM  commands behind a company  corporate proxy server?I tried to google online with no  success.
npm config set proxy http://xxx.cc.zz:8080
npm config set https-proxy http://xxx.cc.zz:8080
Problems using Powershell and Active Directory?
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

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+https://github.com/iamshaunjp/react-playlist.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 https://github.com/react-community/create-react-native-app and I have been advised in another question to use https://github.com/nodesource/distributions 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

Hello Everyone

I am a recently converted vb.net 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?
Get Certified for a Job in Cybersecurity
Get Certified for a Job in Cybersecurity

Want an exciting career in an emerging field? Earn your MS in Cybersecurity and get certified in ethical hacking or computer forensic investigation. WGU’s MSCSIA degree program was designed to meet the most recent U.S. Department of Homeland Security (DHS) and NSA guidelines.  

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?
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
What does it mean to be "Always On"?
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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?

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

I'm a Node newbie. Though was very good at VBScript Classic ASP back in the day!

I have a Nope app running in Express. I got this off an open source project. It works fine. (see below)

I want to make this small adjustment. When the app is accessed, I want to send some text in a URL parameter, such as "Barbara Ann". When the page is called I want to retrieve it into a variable varSongName.
URL parameter will be like "https://quiet-peak-32801.herokuapp.com/?songname=Barbara%20Ann"

I need to know:
Is that how the URL parameter should be for Node/Express/Heroku? Do I need to point to a specific page? or server.js file?
How do I store "Barbara%20Ann" into a session variable when the page is accessed? (in ASP this was Request.QueryString("songname")


FYI: the open sourece project is here https://github.com/squallooo/MT5
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


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