Skip to main content
181,597 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
33 votes
3 answers
5k views

Unable to import webpack-bundled UMD library as an ES6 import

I've authored a javascript library using Webpack. The entrypoint someClass.js looks like this: import x from './x' /* several more imports here */ class SomeClass {} export default SomeClass; My ...
StillFiles2's user avatar
30 votes
2 answers
4k views

Firebase Cloud Functions Error: connect ECONNREFUSED

I am trying to create a Kik Messenger bot according to their API using Firebase Cloud Functions. I am using Blaze Plan. I am trying to reply to a message that my bot received. I can receive messages ...
bennygenel's user avatar
  • 24.5k
29 votes
1 answer
678 views

StriderCD global post install fails on bower access to $HOME/.config $HOME/.cache

I am trying to work out the best way to install StriderCD globally. I installed node and npm via the global-enabled fork of nvm, and all paths are working fine for other builds, but none of them ...
notbrain's user avatar
  • 3,396
28 votes
3 answers
3k views

launch dedicated DevTools for Node.js from command-line

I wondering how to launch "Open dedicated DevTools for Node" directly from the (windows or linux) command-line, without using chrome://inspect url then Open dedicated DevTools for Node button ? My ...
Franck Freiburger's user avatar
23 votes
3 answers
2k views

How do I do populate on mongoosastic?

My goal is to populate certain fields in mongoosastic search, but if I do the following codes, it will always return Here's the code var mongoose = require('mongoose'); var Category = require('./...
Jack Moscovi's user avatar
  • 2,233
20 votes
1 answer
3k views

PNPM linking with standalone NextJS build

I'm trying to create production Dockerfile using NextJS standalone mode and PNPM. In next.config.js i have output configuration: experimental: { outputStandalone: true, outputFileTracingRoot:...
Dooomel's user avatar
  • 586
20 votes
2 answers
2k views

Query based on included data in Sequelize

I have a table for people with a self-association so people can have parents/children/cousins/etc. const People = sequelize.define('People', { gender: Sequelize.STRING, name: Sequelize.STRING, ...
wazzaday's user avatar
  • 9,664
19 votes
2 answers
711 views

How to start a new connection with CosmoDB graph database using gremlin on version ^3

I am trying to create a new gremlin client in node js, but I cannot find any documentation how to set up the connection with both a URL and a primary key (as generated in Azure CosmosDB). Examples ...
Michal Paszkiewicz's user avatar
19 votes
1 answer
23k views

eslint ignores all files when adding specific file to ignorePatterns

I'm trying to implement eslint in a Next.js project but I don't want next.config.js to be linted. I tried adding ignorePatterns to .eslintrc.json, adding a .eslintignore file and adding eslintIgnore ...
Thiago Loddi's user avatar
  • 2,320
18 votes
1 answer
3k views

Two versions of icu4c installed by Homebrew

Whenever I attempted to run npm --version or node --version on my Mac, I was getting the following error: $> node --version dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib ...
stevendesu's user avatar
  • 16.6k
18 votes
1 answer
5k views

Google Page Speed Insights - Basic Authentication

I am current using npm psi to do psi tests against a site which is publicly accessible (except with basic authentication). All of my attempts to use the username:password@ convention have failed me ...
jshthornton's user avatar
  • 1,304
17 votes
1 answer
11k views

Disabling GPU Acceleration in Cypress

I'm running Cypress in a Docker container in Jenkins. This is my Dockerfile: #Base image taken from:https://github.com/cypress-io/cypress-docker-images FROM cypress/browsers:node14.17.0-chrome91-ff89 #...
Tommy VDFN's user avatar
16 votes
1 answer
6k views

How to debug NextJS during the build phase

My nextJS app have a path with 50k plus pages. Running with npm run dev it works fine, but during build it gives me an error TypeError: Cannot read property 'page' of undefined at exportPaths.filter....
Amantel's user avatar
  • 739
16 votes
0 answers
3k views

How to set up Node.js server with cookie based KeyCloak authentication - getting infinite redirects now

I'm setting up a Node.js server that is protected by KeyCloak. This is the first time I'm using KeyCloak, I'm experimenting with various use-cases. I successfully implemented the scenario where I use ...
takacsmark's user avatar
  • 4,381
16 votes
1 answer
2k views

Graphql Yoga Playground with Lambda - "Server cannot be reached"

I'm in the process of setting a graphql endpoint with servlerless/ lambda and am receiving an error when trying to connect to the graphql playground that comes with graphql-yoga. When I go to my route ...
red house 87's user avatar
  • 2,325
16 votes
0 answers
3k views

visual studio code - mongoose (custom) schema methods are not recognized after importing the model into another file

Expected functionality: autocomplete of object methods and recognition of method parameters Actual functionality: no autocomplete or method parameters recognized. hovering over the method displays any ...
vampiire's user avatar
  • 1,190
16 votes
1 answer
2k views

Pipe buffer image data into Uint8ClampedArray format in Node.js

I'm trying to pipe image data into a function that I have been successfully using in the browser. The code in the browser is as follows: var myImageData = context.getImageData(0, 0, width, height); ...
abagshaw's user avatar
  • 6,492
16 votes
3 answers
2k views

Laravel Websockets receive messages from clients

I want to build a basic global (no rooms) chat with laravel / node / redis using websockets. I followed this tutorial: http://blog.nedex.io/laravel-5-1-broadcasting-events-using-redis-driver-socket-...
Frnak's user avatar
  • 6,743
16 votes
2 answers
7k views

Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:*.herokuapp.com, DNS:herokuapp.com

I have an api created and hosted on Heroku. I have my web app running on localhost. I am using NextJS for my app. I am able to access all my apis hosted on Heroku via my web app which is running on ...
BraveEvidence's user avatar
15 votes
2 answers
1k views

How to have top level await in typescript (switch from commonjs to esnext) without having to change all imports to have .js ending

I would like to have top level await in my typescript nodejs project. My tsconfig used to look like this: { "compilerOptions": { "target": "es2017", "...
sev's user avatar
  • 1,762
15 votes
2 answers
11k views

Webpack-dev-server "Cannot GET /"

i'm trying to get my webpack-dev-server to run but i face always the error "Cannot Get /" at the browser. I know that there are serveral questions with the same error, but none of them ...
phpet's user avatar
  • 151
15 votes
1 answer
4k views

CPU-bound process blocks worker pool while using Child Process in NestJS HTTP server

Node version: v10.13.0 I'm trying a very simple test on NodeJS request concurrency involving heavy CPU-calculation. I understand NodeJS is not the best tool for CPU-bound processes, and that a child ...
Bob's user avatar
  • 1,579
15 votes
1 answer
869 views

Chrome doesn't show file as being downloaded until 8 bytes are sent (Firefox does)

I want to have an http method that sends the file to the user, but it needs some time (e.g. 4 seconds) to generate file content. What I want, is the browser to instantly show the file as being ...
Shaddix's user avatar
  • 6,089
15 votes
2 answers
2k views

Cloud Functions of Firebase failed to emulate

When I try to run npm run serve: "build": "./node_modules/.bin/tsc", "serve": "npm run build && firebase serve --only functions", I get an output that says it failed to emulate my functions: ...
Eliya Cohen's user avatar
  • 11.3k
15 votes
1 answer
5k views

Using --ignore-scripts for one dependency in NPM

Following this question, NPM dependencies can be installed using: $ npm install --ignore-scripts Is there a way to mark that a dependency should be installed without running scripts in package.json? ...
Kwoppy's user avatar
  • 299
15 votes
3 answers
4k views

How to create temp table in node.js by use Sequelize and Postgres

I have a question about: "How to create temp table in node.js by used Sequelize and Postgres" I can not found anywhere how to do that without use query command, like findAll(), findOne() functions of ...
Nam Tran Thanh's user avatar
15 votes
1 answer
5k views

Node.js: child_process.spawn no output standard output unless 'inherit'

I'm trying to capture standard output from a spawned child_process in Node.js (0.10.29). Right now I'm just trying with ping. The following code doesn't print (but does ping) var exec = require('...
dbenny's user avatar
  • 151
15 votes
2 answers
4k views

What encoding is expected for Node.js source code?

I’ve done some Google searches, but I get results related to encoding strings or files. Can I write my Node.js JavaScript source code in UTF-8? Can I use non-ASCII characters in comments, strings, or ...
Nate's user avatar
  • 19k
14 votes
1 answer
16k views

webpack 5 - Parsed request is a module

I'm creating webpack5 setup for an small app and while doing I'm facing the below mentioned issue. Please suggest the way to resolve Issue Snapshot Module not found: Error: Can't resolve 'faker' in 'C:...
Gowtham Ganapathi's user avatar
14 votes
1 answer
885 views

Node.js profiler - Everything in Shared Libraries?

I am currently doing Advent Of Code (definately to recommend btw but off topic. However on Day 3 I was pretty unhappy with the performance of my algorithm. So I started using the built in node ...
relief.melone's user avatar
14 votes
1 answer
8k views

Cosmos DB Mongo API How to manage "Request Rate is Large" condition

I Have the following code.. async function bulkInsert(db, collectionName, documents) { try { const cosmosResults = await db.collection(collectionName).insertMany(documents); console.log(...
mark d drake's user avatar
  • 1,435
14 votes
1 answer
1k views

Disable Networking in Electron

electron.js is a user interface toolkit that allows a web application to operate as an arbitrary GUI. However, there are some applications that should be considered sensitive - for instance, a GUI ...
Athan Clark's user avatar
  • 3,918
14 votes
1 answer
540 views

Can I create a federated user in firebase manually using admin authentication api?

I've a web application built using firebase. In my web app, I've google, firebase, twitter signup/signin functionalities. Now I want to integrate this with my api.ai agent and have a seamless ...
Phani's user avatar
  • 1,901
14 votes
1 answer
6k views

Writing a Socket.IO server in C++

I want to write a C++ server that uses the same wire format as Socket.IO. I found the gevent-socketio packet codec for the wire but I can't find the corresponding client codec. The packets get ...
Cuadue's user avatar
  • 3,909
13 votes
1 answer
27k views

How do you get "x-" headers in Next.js

I am following an example from Sara Vieira's Opinionated Guide to React. In the example, she is doing something like this: export async function getServerSideProps({ req }) { const ip = req....
Tithos's user avatar
  • 1,319
13 votes
0 answers
988 views

Wav to Opus convertion with Discord.js/opus fails silently

I am trying to convert a WAV file to Opus, using Node's fs.readFile and passing that buffer to @Discord/opus converter. I get neither the result or a error thrown with a explanation of what is wrong. ...
Rikard's user avatar
  • 7,725
13 votes
0 answers
17k views

RSA_padding_check_PKCS1_OAEP_mgf1:oaep decoding error

I'm trying to use iOS swift (client side) to encrypt some data before sending it to node.js server to decrypt it. However, while decrypting in node.js I'm hitting: Error: error:04099079:rsa routines:...
FSTL's user avatar
  • 151
13 votes
1 answer
1k views

VS Code Intellisense for auto exported global variables

Sails exports a set og global variables, such as: _ (lodash) sails (framework related) ModelOne, ModelTwo, ModelThree, ... (the sails models we define) Creating a jsconfig.json targeting es5 doesn't ...
Diogo Neves's user avatar
13 votes
0 answers
679 views

Should polyfills be a dependency or a devDependency?

As explained by this SO post, polyfills should be in the dependency folder. However, the Array.find() polyfill has the following installation instructions. npm install --save-dev jspolyfill-array....
ptk's user avatar
  • 7,483
13 votes
0 answers
5k views

Node.js: How do I protect against malicious image file uploads? I.e., how do I implement an image sanitizer in Node?

I am creating a web app using hapi.js that allows users to upload images. I am validating the uploaded images in both the client and server to only allow .jpg/.jpeg, .png, and .gif files. However, I ...
Samuel Earl's user avatar
13 votes
2 answers
4k views

What is the difference between mongo ObjectID, ObjectId & Mongoose ObjectId

I can't figure out the difference between mongo ObjectID & ObjectId. The document said ObjectId, but when I read the code, I see import { ObjectID } from 'bson'; To make things even more ...
Qiulang's user avatar
  • 11.8k
13 votes
2 answers
2k views

Node.js Electron Applications for Single Core Windows 7 machines are slow on file I/O

I'm running an electron application on a single core windows 7 machine. It seems whenever I do almost any file I/O with the fs library, the CPU spikes to ~100% for the electron process and it can take ...
Aaron Harrington's user avatar
13 votes
0 answers
7k views

500.1013 error when using iisnode and express

I have an express app running in my machine. I am even able to run it in production by using node server instead of issnode. When trying to make it run in iisnode I'm getting the following error ...
Alvaro's user avatar
  • 41.4k
13 votes
0 answers
1k views

Webpack recompiles unchanged files, slowing build times

Relevant webpack/webpack issue. Using webpack in real projects slows down, in my experience, after you pile on a certain number of components and/or dependencies. I have a test repository that seeks ...
Theodor Vararu's user avatar
13 votes
1 answer
3k views

Can gulp-usemin accept multiple files?

I have an issue with usemin and am not sure if it is a bug. My application structure is simple: - root |- gulpfile.js |- app | |- index.html | |- about.html | |- contact....
Daniel Tate's user avatar
  • 2,134
13 votes
0 answers
4k views

How do I properly run the VJET development tools for NodeJS on Eclipse?

The default javascript editor for Eclipse has very poor outlining and code completion. As a result of this, for any modern javascript application like ExtJS or NodeJS where you need to write a lot of ...
Redsandro's user avatar
  • 11.3k
13 votes
3 answers
6k views

Nest.js: how to override providers in an imported module?

Code example Third party library @Module({ providers: [AService] exports: [AService] }) export class AModule { } @Module({ imports: [AModule], providers: [BService] exports: [...
Mike's user avatar
  • 663
13 votes
3 answers
1k views

Nodejs child_process spawn get command ran

For clarify purposes I want to see the exact command Node.js runs versus the shell/cli. Unfortunately I can't seem to find out how... https://nodejs.org/api/child_process.html#...
2778's user avatar
  • 864
13 votes
2 answers
16k views

Iterating over TR in a table with Cheerio.js

I'm having issues using the selectors that are available for Cheerio.js that I use on my Node server. The core is supposedly based on jQuery, however I can't really make it work using the same ...
Marty's user avatar
  • 483
13 votes
1 answer
70k views

Why would I be getting `Error: write EPROTO` when making an HTTPS request in an Electron app?

I've been pounding my head against the wall for days on this so I am turning to the smart folks at Stackoverflow to help. Here's the deal: System Details Node Version (can't be changed due to ...
Zachary Abresch's user avatar

1
2 3 4 5
3632