Questions tagged as 'nodejs'

1
answer

[JS / NODEJS] Error declaring a variable within a try catch block

----- help.js ---- exports.run = async (command_s, Discord, message, client) => { // temporal const command = "profile"; function string(){ try{x = require('./commands/utility/${command}'+'.js'); var result = x;return result;}c...
asked by 25.12.2018 / 21:25
1
answer

Problem when I want to make a post or get of users

I am working on a project with Javascript, Node.js and Express. I'm trying to do all the user logic but for some reason it does not want to work. The error that postman throws at me is this: <!DOCTYPE html> <html lang="en"> <...
asked by 23.12.2018 / 03:29
0
answers

Problem with express route

This is my server: const express = require('express'); const morgan = require('morgan'); const app = express(); const { mongoose } = require('./database'); // Settings app.set('port', process.env.PORT || 3000); var port = app.get('port'); /...
asked by 23.12.2018 / 01:55
0
answers

Use Filesystem from NodeJS in Heroku

Start a project and to start I need to know if it is possible to use NodeJS FileSystem on a server like Heroku. I need to use the functions of reading files precisely. Using or not using this module would totally change the way in which I will d...
asked by 23.12.2018 / 01:23
1
answer

how do I send ZPL commands from node js?

Best regards to all: Veran I am trying to print a label with the language of zebra, from node js So far it has been possible to connect to the zebra printer (S4M) and print. The problem I have is that it only prints plain text and does not inter...
asked by 20.12.2018 / 19:34
1
answer

spawn cmd ENOENT

I have an error when I start the server in Angular, it does not affect me in functionality, but I would like to correct it, since with the NPM it gives me installation errors. This is the error: $ ng serve -o ** Angular Live Development Ser...
asked by 18.12.2018 / 20:39
1
answer

Search for an element in a MongoDB database using Nodejs

Alright, here I have a code where I have my Express server, the connection to the database and apparently everything works fine. const express = require('express'); const path = require('path'); const cookieParser = require('cookie-parser'); c...
asked by 22.12.2018 / 19:53
1
answer

Error importing tensorflow js in node

I want to use tensorflowjs in the terminal and I copy the code from the npm page and I get an error: (function (exports, require, module, __filename, __dirname) { import * as tf from '@tensorflow/tfjs';...
asked by 21.12.2018 / 23:32
1
answer

Bar Code Reader and Php

I was asked as a job to create a stock control with barcode reader. I would like to know if the application can be done on the web? Or do I have to do it natively obliged mind? I currently have web knowledge, I have never explored the native...
asked by 17.12.2018 / 15:00
0
answers

NodeJs change name of file uploaded with formidable

How can I change the name of the files I upload so they do not have names like these: upload_0b4d7f947b059eff4197c048e9c0dc4e.png router.post('/uploadImage', (request, response) => { const form = new formidable.IncomingForm()...
asked by 17.12.2018 / 16:20