Category "node.js"

Nodejs and SQLite how create multiple tables?

I have question about creating multiple tables in one DB. I try to run for 2 tables, but seems after the first db.run(CREATE TABLE , second db.run(CREATE TABLE

What to use on Nodejs addons. Node.h or Napi.h

I have some pretty simple questions. What is the main difference between node.h and napi.h. What should I use for normal/personal use case. Why are there more "

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

I'm trying to develop DApp on polygon blockchain. Basically I'm minting NFT but after few mints I get this error. It even happens when I don't mint NFT. Here is

Next.js: How to get static assets from within getStaticProps

I am using Netlify CMS. I want to import all the slides for a carousel into my component. I made a collection called slider and added a few slides. That created

Getting error: The expression is not callable Mongoose NextJS

I trying to save data to a mongoose model on NextJS page. I get a typescript error on this line: await User.create(data) This expression is not callable. Each

how can i make og:url meta tags work in node js

I'm trying to share articles with facebook, this is my code: <!doctype html> <html> <head> <meta property="og:url"

Cookies NodeJS not getting saved

Unable to set default cookies in nodejs working fine in contact can anyone see what I am doing wrong the call from front end is handled let handleSignInS u

How to rename Angular Universal entry file to app.js and move it to the app root directory

So I have an Angular Universal SSR app which runs with node. The latest Angular and Universal versions as of 21/01/2021. My hosting company allows me to run nod

Firebase CLI v10.0.1 is incompatible with Node.js v10.24.1 Please upgrade Node.js >=12

I am facing this issue while deploying my firebase function through Git Actions Firebase CLI v10.0.1 is incompatible with Node.js v10.24.1 Please upgrade Node.j

Why is my resetAllMocks not working in jest

The second expect(fs.writeFile).toHaveBeenCalledTimes(1) (in describe('Guid for MPX') returns an error because the writeFile has been called twice. In theory, j

exceljs wrapText doesnt work on merge cell

workSheet.getCell(`B7`).alignment = { vertical: 'middle', horizontal: 'left', wrapText: true // autoHeight }; its only work on 1 cell B7 if i tried

Cannot Install Node Sass with NPM

I am having a hard time installing node-sass on npm, I have attempted to do the following steps: Cleaned the NPM Cache attempted to run "%appdata%\npm-cache" bu

Command 'Solidity: Compile Contract' resulted in an error (Cannot read properties of undefined(reading 'uri'))

Good day everyone, I am working on a lottery smart contract. I am currently done with the remix VM tests and proceeded with the unit tests with JavaScript. The

How I can simulate the __callStatic property of PHP in Node.js using Proxy?

I'm trying to create the same behavior of PHP __callStatic magic method in Node.js. I'm trying to use Proxy to do that, but I don't really know if it's the best

Winston log level filter

I am trying to use multiple transports. I also want to be able to log only one or more specific level(s) on a transport, where Winston logs from the given level

How to fix NPM EJSONParse with this package.json file?

when I try the command npm install I have this C:\Users\khaou>npm install npm ERR! code EJSONPARSE npm ERR! path C:\Users\khaou/package.json npm ERR! JSO

create-next-app' is not recognized as an internal or external command, operable program or batch file

I'm trying to install next app with npx create-next-app nextjs-blog and i keep getting this error; 'create-next-app' is not recognized as an internal or extern

Cannot find module 'prompt-sync'

I'm making Tic Tac Toe game in JavaScript needed prompt-sync to get user inputs. After I installed prompt-sync module using npm I was getting this error wheneve

laravel 8 instalation error - npm run dev throws error

I am trying to install a fresh laravel 8 project. After downloading frontend scaffolding when I try to run npm run dev it gives me an error. This problem also h

CORS issue when changing to ES6 import versus require

My Vue app has a backend with a different url to the front end. In my backend (node) I am using the cors module. My app is a standard express app and I was usin