Category "node.js"

Module not found: Error: Package path ./v4 is not exported from package

I was building a react project but when I tried to run it. It showed the following error: Module not found: Error: Package path ./v4 is not exported from packa

i am using node cron for running jobs , i will this run every day including saturday and sunday '00 00 22 * * *'

i am using node cron for running jobs , i am confused will this pattern run every day including Saturday and Sunday as well '00 00 22 * * *'

Content not from webpack is served from /opt/app/public directory

i have a simple application with react and typescript that display hello world on localhost:8080. When i run my application on command line it works and i see t

cls-hooked: AssertionError [ERR_ASSERTION]: context not currently entered; can't exit

I'm currently deploying an express app to Heroku. I'm using cls-hooked to set request ids for each request. This works perfectly on my local machine and inside

When sending a get request to api, I get an error: has been blocked by CORS policy: No 'Access-Control-Allow-Origin'

When sending a get request to api, I get an error: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

Lodash custom orderBy then by

I need to use lodash to implement a custom sort based on classification, then by creation time, with more recently created items with the same classification ha

How to use sshpass without TTY on a Node.JS backend?

I am running the following in a script: pubkey=$(gpg2 --verbose --export-ssh-key $EXPORT_THIS_ID) sshpass -p$REMOTE_PASS ssh -o IdentitiesOnly=yes -o StrictHost

What's the ideal way to add set data to a database in Nest.JS when starting the app for the first time?

I have a database with quite a few tables, and some of those tables need to have default information in them - stuff like categories, permissions, roles, tags,

Using Firebase with npm

I would like to use Firebase in my project with NPM and I installed it using "npm i firebase". This worked fine so I made a new file called "app.js". Here I wou

Websocket with special characters

I am using websocket with client nodejs and server golang (net library) via tcp. I am read data sent from client but many special chars. Some one can help me ab

mongoose save internal documents creating a document that contains a document

Im learning mongoose and i have a question how to save several documents: // Product.js const categorySchema = mongoose.Schema( { name: String }, { collecti

Error: PollingBlockTracker - encountered an error while attempting to update latest block: Error: ETIMEDOUT

I want to run a code in my terminal. " truffle migrate --network ropsten" 1_initial_migration runs correctly, but I have an error for 2_deploy_conracts.js like

When using babel-loader with webpack, does babel-loader transpile code differently than when using Babel directly?

Are the defaults the same? Do they have different targets? Is babel-loader contingent on webpacks targets? Reason I ask is I am using babel-loader with webpack

Joins on database engine vs on client-side [duplicate]

I am creating an API with express.js for a food app and I can't figure out what is the best (most efficient) way to query the data and send it

Nodejs encrypt and decrypt using crypto decrypt badly only firsts characters

I have a js script that crypt and decrypt a file using these two functions Encryption function encryptFile(fileName) { const input = fs.createReadStream(fil

Understanding how path works in Node

So I have developed a Node Api and on local the path works fine, but I want to move it now to a server online, and don't know how to address the path. This is t

Defining API class in component based structure

I have been reading the 'Node JS Best Practices' Github article. One point that I I found interesting was the very first best practice. Here they split up the p

Error pulling my own TypeScript package from NPM after using direct reference to GitHub branch for debugging

I have two packages that are both held on NPM, we can refer to them as A and B A uses B, so when I PR and merge with B it automatically updates NPM with those d

nodejs 10 stubbornly installing in ubuntu 20 even after adding new verision ppa

I am trying to install node.js latest version from node.js source official github repo. but after all running all commands yet, at apt-get install nodejs. syste

Mongoose - "Enriched" Query with Data from other Collection

I'm quite new to using Mongoose and therefore not too familiar with operations that go beyond finding data in a single collection. Was googling approaches to ac