Questions tagged as 'nodejs'

1
answer

problem when trying to use serialport in electron

Good ... install serialport with npm install --save serialport and when doing let serialport = require('serialport'); and try to run the application I skip the following error. and this in console: pd: I did not k...
asked by 10.01.2017 / 05:23
1
answer

Read JSON file on android

I try to log-in, the server being programmed in Javascript (using node.js). The problem that I have (which I saw is very common but still do not find my problem back) is that when I try to read it I get the following message: Value //Objeto J...
asked by 08.01.2017 / 20:32
2
answers

Execute a node script indefinitely to query a DB?

I have some nodejs scripts to query a mongo Db, but what I want is that this script is running indefinitely, maybe with a 5 minute sleep, and if it stops there is another script that he "revives" him. Any ideas on how to do these processes? I...
asked by 02.12.2016 / 18:57
0
answers

Problems with static routes with node, express

Good afternoon, I have a problem but I do not give with the joke, I'm linking a file called appAllMarket.js to my html but can not find the path, the problem that I think is that it is in a folder called models outside the folder...
asked by 20.04.2017 / 01:02
0
answers

Get error number, from a whole answer in json - NodeJS

I need to get from this answer, only the error number. If it is 404, 403, or some other. This is done at NodeJS, does anyone have any idea how I can do it? I leave the answer. GotError: GET https://api.github.com/repos/org/repo/contents/...
asked by 05.12.2016 / 16:35
0
answers

Because my server node returns this error Error: request entity too large?

I try to login with github but in the Node backend when I do the exchange of the code that returns me git for callback for an access_token I have this error Error: request entity too large fetch('https://github.com/login/oauth/access_t...
asked by 25.01.2017 / 17:17
1
answer

Error in function within object

module.exports = { post: (title, body, autor) => { this.title = title this.body = body this.autor = autor }, search: function(search, arr , call){ var result = arr.find(a => a.title == search) call(nu...
asked by 05.11.2016 / 18:39
1
answer

problem with mongoose database

I have an error that sends me postman Product is not a function My code in nodejs is as follows 'use strict' const express = require("express"), bodyParser = require("body-parser"), mongoose = require("mongoose") const...
asked by 31.10.2016 / 12:47
1
answer

Date does not detect date change immediately from OS

I've done this little test with typescript and nodejs : setInterval(() => { console.log(new Date()); }, 3000); and while the script is running, I change the date in the system (Windows 10), and the script...
asked by 02.11.2016 / 19:28
1
answer

The --require and -r flags are deprecated

When wanting to run the AVA tests on Windows using this command: npm run test which in turn executes this command: "SET \"NODE_ENV=test\" & nyc ava --require babel-register test/**-test.js $AVA_ARGS", throws me this error:    Th...
asked by 19.12.2016 / 19:00