All Questions
Tagged with node.js javascript
177,475
questions
0
votes
2
answers
23
views
How to handle file uploads in Next.js using Formidable?
I'm developing a project using Next.js, and I need to manage file uploads. I'm attempting to use the formidable library to handle these uploads on the server side, but I'm encountering some problems.
...
0
votes
0
answers
25
views
Error with function to display a word on a canvas block
Code not working as expected
this function was been flagged:
function launchWord() {
fetch('/word')
.then(response => response.text())
.then(word => {
const x ...
0
votes
1
answer
24
views
Mysql2 Error when lost connection, it don't reconnect
I develop in nodejs (expressjs) with mysql2. When I close or restart mysql server my application thorws error and nodemon crashes and don't reconnect to mysql server. I want to reconnect every 5 ...
-1
votes
0
answers
16
views
npm install hangs up when using bundleDependencies [closed]
My package.json dependencies looks as below:
"dependencies": {
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"express": "^4.18.2&...
-2
votes
0
answers
16
views
Format data to show pretty
I often have to parse various data. As a rule, these are scripts written at short notice. Then I need to pass this data to a human. What ways do you know how to display the data in a nice and simple ...
0
votes
0
answers
19
views
Web Component not rendering when loaded from UNPKG CDN?
I'm trying to render a web component in Stackblitz using the UNPKG CDN.
This is the script element that should load it:
<script src="https://unpkg.com/fspubtest1234"></script>
...
0
votes
0
answers
10
views
Event handling for encapsulated socket.io server
I (js beginner) am creating a node.js webapp with socket.io. I encapsulated my socket server and namespaces to a single module that I call socketManager.js because I heard that this is generally good ...
0
votes
2
answers
34
views
Where to save hashed passwords for user login? [closed]
I am designing a website for my company that will have a user log in page that will lead to a customized dashboard. I am currently, using PostgreSQL to store information in the back end of this ...
2
votes
0
answers
14
views
Issues with Image Upload in Express.js Using Multer
I am developing an Express.js application and trying to add the facility of image upload by Multer. I am getting some issues, so any kind of help will be appreciated.
Problem:
The file doesn't upload, ...
0
votes
0
answers
11
views
How to add a user to a ticket using UserSelectMenuBuilder
I managed to create a UserSelectMenuBuilder but I don't know how to make it so that when an interaction occurs (so a user is selected) I can make the channel visible to him and make him write
Can ...
0
votes
2
answers
19
views
How do I use the find() method to query a mongoose schema with an enum field (can hold multiple values (array)) that includes a particular value?
I have this schema:
const User = new Schema({
firstName: {
type: String,
required: true
},
lastName: {
type: String,
required: true
},
mobile: {
...
-2
votes
0
answers
24
views
err: insufficient funds for gas * price + value when the address already has sufficient funds
I am attempting to send a transaction in the Ethereum Sepolia testnet, but I keep getting gas fees errors. I have had the transaction signed and sent using the web3 library.
const { Web3 } = require('...
1
vote
1
answer
52
views
How to import json files in node v22
i was configuring a rollup.config.mjs file and
this is how i used to import json files
import packageJson from "./package.json" assert { type: "json" };
as far i have tested it ...
-4
votes
0
answers
32
views
Error [ERR_REQUIRE_ESM]: require() of ES Module, how do get my Mocha tests to run
I am trying to run a simple Mocha tests. But I keep getting this error:
Exception during run: Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Code\MochaTests\node_modules\chai\chai.js from C:\Code\...
0
votes
0
answers
19
views
The children component is overlapping with the sideNav
SideNav is Overlapping with the Dashboard Children Component
I'm experiencing an issue where my SideNav is overlapping with the Dashboard children component. Below are the relevant pieces of code:
...