Questions tagged [javascript]
For questions about programming in ECMAScript (JavaScript/JS) and its different dialects/implementations (except for ActionScript). Note that JavaScript is NOT Java. Include all tags that are relevant to your question: e.g., [node.js], [jQuery], [JSON], [ReactJS], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript
2,532,284
questions
0
votes
0
answers
7
views
How can I make an image fit the width and height of a div in HTML and CSS?
I have a container with the width of 100%. I then added left div of 40% and right div of 60% to make it 100% width. I added an image to the right div and wanted it to fit the width and height of the ...
0
votes
0
answers
3
views
Cannot get final name for export 'decodePacket' of ./node_modules/engine.io-parser/build/esm/index.js
My problem is as follows: when I run a npm run build on my next js application, the import { io } from "socket.io-client"; gives me the error Cannot get final name for export 'decodePacket' ...
0
votes
0
answers
5
views
How do I get the canvas to be centered in the screen while keeping the functionality of my mapInterationCSS
I can't for the life of me get the image to be centered in the screen on page load the map is functional as far as being able to move it around for a VTT application but it overlaps with the map ...
0
votes
0
answers
4
views
Receiving TypeError: ReadableStream: Expected <ref *1> ReadableStream . Not sure where to begin
I'm running into an issue I'm unsure of how to debug or even how to begin.
When making an API request to either my OpenAI or ReplicateAI on the local dev and build version of my Next.JS application I ...
0
votes
0
answers
6
views
How to ensure that "ExeBuilder" utilities for Spoon Studio or Turbo studio is an old file from closing automatically in Windows 10 and 11?
"ExeBuilder" utilities for Spoon Studio or Turbo studio is an old file every time I open it or else when I open to search for an icon it closes automatically it is missing files or something ...
1
vote
0
answers
13
views
Client-side validation error animation not resetting properly
I have implemented a form validation and error display system using TransitionGroup for animations. The issueVisible flag controls the visibility of the error message, and determineField() helps ...
-4
votes
1
answer
28
views
Performance of using map once vs. multiple times [closed]
For most of my development career, I was convinced that iterating over an array multiple times should be avoided.
After a lot of back and forth, I'm not so sure anymore, so I'd like to ask for your ...
-3
votes
0
answers
17
views
I'm trying to send a post request from my frontend, but my backend isn't receiving it
this is code that send's the data to the backend , when i console log the data , i can see it in my console, also it's a button that triggers the post request, the request it's not coming from a form. ...
0
votes
0
answers
5
views
Truffle deploying Error: PollingBlockTracker
I have attempted to deploy the contracts through Polygon Amoy and Sepolia, and both of them produce the same error. I have launched Ganache with the same MNEMONIC as the MetaMask wallet and the one ...
-1
votes
0
answers
16
views
I have to prevent duplicate entries into the object array, the code works, except for the default value 'Lucky Fin'
`> import { useState } from "react";
const App = () => {
const [persons, setPersons] = useState([{ name: "Lucky Fin" }]);
const [newName, setNewName] = useState(" "...
0
votes
0
answers
31
views
How can I correctly print different contents of an array retrieved from an API using JavaScript?
I am fascinated by both American football and APIs, so I am learning how to make a football database. As of now I am attempting to print a simple list of the NFL's teams and their win/loss record, ...
-1
votes
0
answers
4
views
How to make a shopify app/function call an azure function
I have made a shopify app using the delivery customization framework. It has a function in the run.js
//...Above code
export async function run(input) {
const configuration = JSON.parse(
input?....
0
votes
0
answers
24
views
Map values set inside of a function not availabe in a different function
My NextJS server executes a function called "loadAllUserPools" during start up. Here's what the [abbreviated] file with this function looks like:
let userPoolMap = new Map();
export async ...
-1
votes
0
answers
18
views
Converting a HEX color value to RGB in JavaScript
I have this code:
let hexInt = parseInt(hex, 16);
let r = (hexInt >> 16) & 255;
let g = (hexInt >> 8) & 255;
let b = hexInt & 255;
I know that a HEX digit requires 4 bits to ...
1
vote
0
answers
29
views
React: Button Requires Double Click to Trigger Email Sending After Data Load
I have a React component where I'm fetching data and attempting to send an email using the fetched data when a button is clicked. However, I'm encountering a problem where the button needs to be ...