All Questions

Tagged with
Filter by
Sorted by
Tagged with
374 votes
17 answers
552k views

No 'Access-Control-Allow-Origin' - Node / Apache Port Issue

i've created a small API using Node/Express and trying to pull data using Angularjs but as my html page is running under apache on localhost:8888 and node API is listen on port 3000, i am getting the ...
user1336103's user avatar
  • 3,859
336 votes
5 answers
111k views

Difference between MEAN.js and MEAN.io

I wanted to use the MEAN JavaScript Stack, but I noticed that there are two different stacks with either their own website and installation methods: mean.js and mean.io. So I came up asking myself ...
CMPSoares's user avatar
  • 4,185
311 votes
13 answers
682k views

How to reload or re-render the entire page using AngularJS

After rendering the entire page based on several user contexts and having made several $http requests, I want the user to be able to switch contexts and re-render everything again (resending all $http ...
andersonvom's user avatar
  • 11.8k
307 votes
17 answers
450k views

How do I fix the npm UNMET PEER DEPENDENCY warning?

I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. npm install angular-material mdi errors with: +-- [email protected] +-- UNMET ...
Reza's user avatar
  • 5,476
296 votes
34 answers
507k views

ERROR in Cannot find module 'node-sass'

Config: macOS High Sierra, version 10.13.2, node:v8.1.2 npm:5.0.3 When I run npm start in my angularjs project I get this error: ERROR in Cannot find module 'node-sass' After this I run: npm i node-...
bier hier's user avatar
  • 21.9k
206 votes
5 answers
59k views

Is AngularJS just for single-page applications (SPAs)?

We are looking at options to build the front end of an application we are creating and are trying to evaluate a tool that will work for us and give us the best platform to move forward. This is a ...
Modika's user avatar
  • 6,252
175 votes
14 answers
609k views

How npm start runs a server on port 8000

I recently used a angular-seed folder from github for angular application development. In some previous angularjs tutorial there was a script folder and a server.js file in the angular-seed folder ...
user3724677's user avatar
  • 1,841
159 votes
36 answers
142k views

Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version

I am getting the below error: { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version Here are my ...
navra's user avatar
  • 1,591
122 votes
10 answers
48k views

What's the use of Jade or Handlebars when writing AngularJs apps

I am new(ish) to the whole javascript full stack applications, and completely new to Angular, so I was hoping somebody can put the record straight for me here. Why would I need to use a templating ...
Jay Pete's user avatar
  • 4,191
108 votes
6 answers
92k views

Difference between jQuery vs. AngularJS vs. Node.js [closed]

I'm just starting web development, and so far I know: HTML - layout of website CSS - make it look pretty JavaScript - functionality Then what is jQuery, AngularJS, and Node.js? After doing a quick ...
K Split X's user avatar
  • 4,181
96 votes
22 answers
460k views

WebSocket connection failed: Error during WebSocket handshake: Unexpected response code: 400

I am trying to integrate Socket.io with Angular and I'm having difficulties making a connection from the client-side to the server. I've looked through other related questions but my issue is ...
ashe540's user avatar
  • 2,141
85 votes
7 answers
313k views

Reading Excel file using node.js

Okay so i am using the FileUploader module to upload my file from angular to my REST API: var uploader = $scope.uploader = new FileUploader({ url: api.getUrl('uploadCompetence',null) }); This is ...
Marc Rasmussen's user avatar
80 votes
7 answers
68k views

Do I need node.js to use Angularjs?

I would like to use angular.js for my Image Editing Tool in my website. Do I need node.js also? I don't understand the scenario. If I don't need it, then when do we use both nodejs and angularjs ...
Manikandan Arunachalam's user avatar
78 votes
6 answers
54k views

Structuring a Node.js and AngularJS application

I'm about to attempt my first AngularJS project, and it makes sense to use Node.js for the back end, even though it means learning both AngularJS and Node.js from scratch at the same time. The first ...
jonhobbs's user avatar
  • 27.4k
75 votes
10 answers
63k views

AngularJS - server-side rendering

As you may know, AirBnb opensourced Rendr (http://nerds.airbnb.com/weve-open-sourced-rendr) which should enable server-side rendering of Backbone apps. This is cool, because one can run the first "...
tillda's user avatar
  • 18.5k
72 votes
6 answers
92k views

MongoDB not working. "ERROR: dbpath (/data/db) does not exist."

I'm getting the following error when I try to run "mongod" in the terminal. I've tried uninstalling, reinstalling, and restarting the machine. Any suggestions on how to get it working would be amazing....
user3810163's user avatar
72 votes
13 answers
255k views

SyntaxError: expected expression, got '<'

I got SyntaxError: expected expression, got '<' error in the console when i'm executing following node code var express = require('express'); var app = express(); app.all('*', function (req, res) {...
underscore's user avatar
  • 6,782
71 votes
2 answers
131k views

How to send error http response in express/node js?

So in login page I am sending credentials from angular to express through get request.What I wanna do is that if found in database,send response and handle it in angular else if not found in db I want ...
Mohammed Gadiwala's user avatar
71 votes
4 answers
71k views

AngularJS Authentication + RESTful API

Angular+RESTful Client-side Communication w/ API for Auth/(re)Routing This has been covered in a few different questions, and in a few different tutorials, but all of the previous resources I've ...
couzzi's user avatar
  • 6,336
65 votes
7 answers
243k views

CORS error :Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response

I am trying to send the request from one localhost port to the another. I am using angularjs on the frontend and node on the backend. Since it is CORS request, In node.js, i am using res.header('...
Abhishek Kulshrestha's user avatar
62 votes
23 answers
418k views

nodemon app crashed - waiting for file changes before starting

EDIT After further testing, I have found that this is happening with both gulp and grunt on this app and on the default install of mean.js. I'm running this locally on a Mac. When I running either ...
MTD's user avatar
  • 659
60 votes
6 answers
37k views

What does Express.js do in the MEAN stack?

I have recently have gotten into AngularJS and I love it. For an upcoming project I am looking to use the MEAN stack (MongoDB, Express, Angular, Node). I'm pretty familiar with Angular and I have a ...
NicolasMoise's user avatar
  • 7,261
57 votes
5 answers
134k views

Download text/csv content as files from server in Angular

I am trying to stream a csv file from a node.js server. The server portion is very simple : server.get('/orders' function(req, res) { res.setHeader('content-type', 'text/csv'); res.setHeader('...
Michael's user avatar
  • 22.6k
55 votes
12 answers
234k views

How to run html file using node js

I have a simple html page with angular js as follows: //Application name var app = angular.module("myTmoApppdl", []); app.controller("myCtrl", function ($scope) { //Sample login ...
kittu's user avatar
  • 6,899
53 votes
3 answers
51k views

How to use AngularJS routes with Express (Node.js) when a new page is requested?

I'm using Express, which loads AngularJS from a static directory. Normally, I will request http://localhost/, in which Express serves me my index.html and all of the correct Angular files, etc. In ...
371273's user avatar
  • 5,426
51 votes
14 answers
62k views

Karma not running unit tests due to "No captured browser" message

I'm trying to set up Karma to run AngularJS unit tests using Jasmine, but I can't get the tests to run. I'm sure I'm overlooking something simple. I'm running this on a Windows 7 machine with Node.js ...
levelnis's user avatar
  • 7,695
50 votes
5 answers
25k views

AngularJS + sails.js

I am developing an app that can utilize sails.js for back-end and AngularJS for Front-end. I thought that I'll create an Angular App using Yeoman-angular generator https://github.com/yeoman/generator-...
rishy's user avatar
  • 1,559
46 votes
5 answers
30k views

Using grunt server, how can I redirect all requests to root url?

I am building my first Angular.js application and I'm using Yeoman. Yeoman uses Grunt to allow you to run a node.js connect server with the command 'grunt server'. I'm running my angular ...
Charlie Martin's user avatar
45 votes
3 answers
78k views

How can I use HTTPS in AngularJS?

I am using AngularJS, $resource & $http and working with apis, however due to security reason I need to make an HTTPS request (work under the HTTPS protocol). What's the way to use https in ...
Dick Van Ocampo's user avatar
44 votes
5 answers
32k views

Using Express Handlebars and Angular JS

Background I am currently building a website that uses NodeJS for the server, Express Handlebars(Just Handlebars but server side) , and hopefully AngularJS for some client side stuff. The Problem ...
Noah Huppert's user avatar
  • 4,178
43 votes
6 answers
105k views

SocketIO ERR_CONNECTION_REFUSED

I am starting to use NodeJS and Socket.IO. I am trying to set up a basic example with a NodeJS http server and establish a Socket.IO connection to the server. I am also using angular JS and ...
tampeta's user avatar
  • 551
43 votes
3 answers
43k views

What are the basic differences and similarities between Angular js and Express js? [closed]

So I am a bit confused in regards to the aim of Angular js vs Express js. From my understanding we use Node.js to serve Angular js but we are not entirely limited/forced to use Node.js for serving it. ...
BluePython's user avatar
  • 1,587
42 votes
19 answers
209k views

Error : getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443

I am working on a corporate network. Trying to install npm. But I'm getting this error again and again. $ npm install npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe"...
Bhuvaneshwari K's user avatar
42 votes
4 answers
34k views

Why would one want to use Express instead of AngularJS?

I understand that Express resides on the server and Angular resides on the client but, as far as I know, Angular can do everything that Express can do which is routing interacting with the database ...
user avatar
39 votes
1 answer
5k views

Stripe Error: 'Token is Not Supported' when trying to sign up to subscription

Can't find any information on this particular error anywhere so please bear with me. My Angular/NodeJS app has a payment page (for monthly and annual subscriptions) handled through Stripe. I've ...
JVG's user avatar
  • 20.7k
39 votes
3 answers
34k views

Handling cancelled request with Express/Node.js and Angular

When a pending HTTP request is cancelled by a client/browser it seems that Node with Express continues to process the request. For intensive requests, the CPU is still being kept busy with unnecessary ...
Derek's user avatar
  • 3,325
37 votes
5 answers
14k views

Authenticate client-side app to REST API using CORS with local strategy

The Problem: Serving a secure API to a client side app using only a local authentication strategy. The red arrows are part of the knowledge gap. Context: That is --- client.example.com is making a ...
36 votes
15 answers
174k views

Error: ENOENT: no such file or directory, stat '/public/main.html' at Error (native)

This is my server.js file: var express = require('express'), app = express(); app .use(express.static('./public')) .get('*',function (req,res) { res.sendfile('/public/main.html'...
pradeep murugan's user avatar
35 votes
7 answers
94k views

npm ERR! git dep preparation failed when trying to install package.json

I'm trying to install package.json file using the command npm install, but I'm getting the following error. npm ERR! git dep preparation failed npm ERR! command C:\Program Files\nodejs\node.exe C:\...
Dhruv Mistry's user avatar
34 votes
2 answers
22k views

How to create and manipulate promises in Protractor?

I want to use the Node Http module to call my server directly in order to set up my Protractor tests. Http is callback based and I want to turn that into promises. For example, I want to have this ...
Konrad Garus's user avatar
  • 53.5k
33 votes
3 answers
19k views

Yeoman for Angular, then "grunt serve" won't start

This is the first time I use yeoman to setup the scaffolding for an AngularJS app, and I have to admit I am likely new to the nodeJS, grunt and bower world. So, here's what I've done so far: I made ...
Alpha's user avatar
  • 7,746
33 votes
3 answers
94k views

Upload multiple files in angular

I've a situation where I've a form in which I've a row where I've two text fields entries and I've to upload a file for that row and this kind of rows can be 'N' and then there is a master files that ...
J Bourne's user avatar
  • 1,409
33 votes
5 answers
62k views

error ReferenceError: ObjectID is not defined

I want to upload image with GridJS. I am using https://www.npmjs.org/package/gridfs-stream for this. It gives me error ReferenceError: ObjectID is not defined. I am beginner to this, so have no idea ...
Anup's user avatar
  • 9,582
32 votes
6 answers
47k views

How to get folder path using electron

I am very new to the electron. Can anyone suggest me how to get a local folder's relative path using the electron? JavaScript does not have that capability. I have a Choose File button(see snapshot), ...
Surjeet Bhadauriya's user avatar
32 votes
5 answers
12k views

How to do Integration Testing for (Angularjs) Web Apps

I'm developing an Webapp. It consists of 2 parts. A node rest server and an angularjs client. The app is structured this way: Rest Server <--> Api Module <--> Angular App The server is ...
user avatar
30 votes
7 answers
22k views

How to debug angular protractor tests in WebStorm

There is a way to run and debug protractor web-tests in WebStorm. I just want to share this answer here
S Panfilov's user avatar
  • 17.2k
30 votes
8 answers
22k views

Warning: Running "compass:server" (compass) task

D:\Projects\mallspk>grunt serve Running "serve" task Running "clean:server" (clean) task >> 0 paths cleaned. Running "wiredep:app" (wiredep) task Running "wiredep:test" (wiredep) task ...
user avatar
30 votes
18 answers
250k views

npm install error from the terminal

I am trying to install node in my mac.. i am getting the following error... i downloaded the node from node site and ran that package... can you guys tell me why i am facing that errror..when i do npm ...
user avatar
30 votes
8 answers
99k views

How to import moment.js in ES6 using npm?

I am using angular js and nodejs along with ES6. I want to import the moment.js in the angular js code. I did 'npm install moment --save' Now I am able to see moment.js file in moment folder which is ...
Santhosh Aineri's user avatar
30 votes
1 answer
21k views

Optimal plugins and project to use IntelliJ IDEA for JavaScript? [closed]

I'm building a web application using a MEAN stack: MongoDB, Express, Angular, and Node.js, based on Daftmonk's angular-fullstack Yeoman generator. Because most of my work is Java, I'm using IntelliJ ...
Charney Kaye's user avatar
  • 3,968

1
2 3 4 5
184