2,530,073 questions
1
vote
0
answers
11
views
How to migrate my CRA .eslintrc.js config to eslint.config.js in a new Vite + React 19 app
I'm trying to set up the same ESLint configuration in my new React 19 + Vite app using the modern eslint.config.js format. However, it's not working — the linter doesn’t show any errors or warnings in ...
-3
votes
0
answers
20
views
PHP Parse error: syntax error, unexpected single-quoted string "+ x +", expecting "," or ";" [duplicate]
The following is part of a script to dynamically add lines to a form:
'<div class="col-15">'+
'<label <?php echo $participant_name_'+ x +'_err;...
-3
votes
2
answers
58
views
TypeError: Cannot read properties of null (reading 'name') in JavaScript function
I'm trying to get a user's name and convert it to uppercase. Here's my code
function getUserName(user) {
return user.name.toUpperCase();
}
const user = null;
console.log(getUserName(user));
But ...
0
votes
1
answer
22
views
Share function between content and background script (chrome extension)
I'm building a Chrome extension using Vite and TypeScript with manifest v3. The extension has:
A background.ts file, defined as a service worker (with "type": "module" in manifest....
-4
votes
2
answers
76
views
How to clear before paste in Javascript? [closed]
I'm using the code below to paste a string into a DOM element (in this case a DIV element in a React website).
The code works but if the element has already some text, the code will paste my string ...
0
votes
0
answers
34
views
The Node.js application using the dotenv package fails to read environment variables from the .env file. As a result, the following error occurs:
C:\Users\user\Desktop\NexoGame-b>npm run server
> [email protected] server
> nodemon server.js
[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s)...
-1
votes
1
answer
33
views
Conditional Reset Button with Confirmation
I'm trying to implement a reset button in Oracle APEX that:
Shows a confirmation dialog (P1002_CONF_MESSAGE item) only if any form fields were modified
Resets immediately if no changes exist.
Is that ...
1
vote
0
answers
30
views
Cloud Run service has SSL certificate error, causing Failed to fetch from Chrome Extension
I have a Google Cloud Run service that I am trying to call from my Chrome Extension, but the request fails. Here is my setup and the issues I'm encountering.
Goal: My Chrome Extension popup makes a ...
1
vote
1
answer
68
views
Having issues with function scoping and generally how the browser JavaScript engine executes JavaScript code
First I linked two JavaScript files to my HTML
<script src="script.js"></script>
<script src="main.js"></script>
On the first file ( the "script.js&...
1
vote
2
answers
37
views
Attempting to make a lightbox, Images not loading
Expected to happen: Clicking on image will make it appear inside lightbox which covers screen
What actually happened: Lightbox appears, image doesnt load
I'm very new to all kinds of programming so ...
1
vote
1
answer
64
views
Recursive function causing incorrect sequence order
Why is MoveToFirstError Called Before LinkedFormWithErrorID is Set in Form Validation Logic?
I'm working on a JavaScript form validation system that handles both a main form and linked forms (e.g., ...
0
votes
1
answer
39
views
"window is not defined", but stack looks incorrect; how to get an accurate call stack? [closed]
Somewhere, an include in our service worker apparently is accessing window.<something>, presumably from a global initializer. But in the debug output, I just see a reference to - what seems to ...
0
votes
1
answer
25
views
Vue 3 + Jest: Function doesn’t trigger expected state change in test
I'm writing unit tests for a Vue 3 component using the Composition API, Vue Test Utils, and Jest. The component has a method that triggers an API call and updates a step variable based on the result. ...
-2
votes
1
answer
44
views
JavaScript fetch body empty when using CloudFlare [closed]
I'm not even sure where to start with this...
Basically:
My POST requests work fine when connecting to the IP directly
When I connect via CloudFlare the POST request gets received by the Server, but ...
0
votes
1
answer
28
views
Jest : Cannot find module '@/components/auth/Login.vue' from 'src/tests/Login.spec.ts'
I'm having trouble running unit tests with Jest in a Vue 3 + TypeScript project. When I run the test, I get the following error:
npx jest --no-cache src/tests/Login.spec.ts
FAIL src/tests/Login.spec....
1
vote
1
answer
76
views
How can I cache video content with the <video> tag in React?
I have this piece of code:
<video
ref={videoEl}
width={videoWidth}
height={videoHeight}
controls={true}
preload="auto"
onPlay={onPlayClick}>
<source src={videoUrl} ...
0
votes
2
answers
32
views
How to get the attributes of the currently active widget in Elementor editor via JavaScript?
I'm building a custom Elementor extension and need to access the attributes (settings/controls) of the currently selected widget in the Elementor editor using JavaScript.
So far, I’ve tried inspecting ...
-3
votes
0
answers
41
views
How to implement accessible, semantic HTML for custom-styled form while maintaining compatibility across screen readers, without relying on JavaScript [closed]
I’m currently working on a sleek, visually customized form design, but I’ve hit a wall. The styling is breaking semantic structure, and screen readers aren’t handling it well. Since I want to keep ...
0
votes
0
answers
19
views
How to use the same configuration file in both content scripts and background module in Manifest V3? [duplicate]
I’m developing a Chrome extension using Manifest V3.
My background script is a module ("type": "module"), so it uses
import { CONFIG } from './config.js';.
My content scripts, ...
-2
votes
0
answers
33
views
function losses it's this context when passed in tanstack/react-query-devtools as the queryFn [duplicate]
I am using "@tanstack/react-query-devtools": "^5.69.0" in my react project. And i am passing one of the arguments conditionally by binding it to the this context object of the ...
1
vote
0
answers
29
views
Embedding Plotly graph in pytest report
I'm trying to embed a Plotly graph in a pytest-html report. To do it, a plotly.Figure is generated during the test execution, and then inserted in the pytest report in the pytest_runtest_makereport (...
-10
votes
0
answers
37
views
Uncaught TypeError: Cannot read properties of undefined (reading 'useLayoutEffect') [closed]
redux-BkxX5gv2.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'useLayoutEffect')
at Be (redux-BkxX5gv2.js:1:2040)
at redux-BkxX5gv2.js:1:2071
Be @ redux-BkxX5gv2.js:1
(...
1
vote
1
answer
33
views
How to dynamically update nested data with dependency on parent?
I have nested alpine.js x-data tags, where the nested tag depends on the parent, like the following:
<div x-data="{foo: 1234}">
<input x-model="foo" type="number&...
1
vote
0
answers
67
views
How to convert JSON layout data into a structurally accurate HTML representation? [closed]
I've been building a project of creating a webpage design from an image of that page.Most of the application for this purpose uses AI but I am not using them.
I went for a complete raw approach with ...
0
votes
0
answers
20
views
How to restrict access to a page in React based on Supabase user login? [duplicate]
Body
I'm building a kids' poem and story website using React and Supabase. I have successfully implemented login/signup using Supabase auth.
What I'm trying to do:
I want to restrict access to certain ...
-1
votes
0
answers
28
views
Module Federation Vite is not working on Safari: ReferenceError: Cannot access uninitialized variable
I have multiple React/Vite apps, and one called App Shell which is the host of all of the module federated apps. Based on the route of the page I am loading a remote app using loadRemote function from ...
0
votes
1
answer
68
views
How can Apps Script WebApp retrieve request's cookie in doGet(e)?
I want to pass a (HttpOnly) cookie to Google Apps Script doGet(e) endpoint (e.g. from fetch(...) on the client), but there doesn't seem to be any way to retrieve incoming cookies/headers out of e.
I ...
2
votes
1
answer
51
views
Equivalent of `supportedLocalesOf` for letter-case conversion (`toLocaleLowerCase`, `toLocaleUpperCase`)?
In JavaScript, you can introspect support for various internationalization functionality by use of static supportedLocalesOf methods of the various classes namespaced under Intl. For example:
Intl....
-1
votes
0
answers
40
views
Consecutive <Typography> crashes
I am very new to Reactjs and I am trying to use MUI for my app. It's very simple but I get a message error when I put two consecutive Typography such as
import textcontent from "../textcontent/...
-4
votes
0
answers
32
views
main.tsx:1 Failed to load module script: [closed]
I had tried to update package.json, index.ts , tsconfig.json and all files in the server to setup but still get this error-
Error - main.tsx:1 Failed to load module script: Expected a JavaScript-or-...
0
votes
1
answer
35
views
problem -> npm http-server dowloading file
I'm new to npm and I tried to start a new simple project. Initially it just had index.html with h1 Hello world. When I try to start a server using http-server ./index.html it works to some extent but ...
-2
votes
0
answers
62
views
Best way to structure variables in vanilla javaScript for a small project [closed]
I am new to learning frontend web dev and i am working on a simple pomodoro web app although it has many settings and states to keep track of i want to know if it's common use to let functions modify ...
-4
votes
0
answers
44
views
Visual Studio Code not giving the output I'm looking for [closed]
When I write this code
const selenium = require("selenium-webdriver")
myFirstTest = async function(){
console.log("hello");
};
I should receive a "hello" ...
0
votes
0
answers
76
views
Frida gives the error "not a TypeError: not a function" on a simple call to Java.perform
I trying to learn frida so I'm doing some basic tutorial from the web.
This is the script I've written:
Java.perform(function() {
const MainActivity = Java.use('group.cognisys.fridame.MainActivity'...
0
votes
0
answers
31
views
Infinite loop inside the block with console.log("3") in it. redirecting keeps erasing my locales i think
Here's all of my code. It's riddled with comments but aside from that i don't understand how it keeps looping infinitely
next.config.ts:
import type { NextConfig } from "next";
import { ...
-1
votes
1
answer
85
views
js v8 function inlining
I'm intresed how and in what cases V8 perform inlining.
I know that V8 can inline functions to eliminate call cost, but i dont konw the rules for it to happen.
I got how it works in obvious cases, ...
1
vote
1
answer
39
views
Laravel Filepond not including file input with Post or Put in Request
I had this filepond instance:
<input type="file" name="files[]" class="filepond" multiple />
<script src="https://unpkg.com/filepond-plugin-image-preview/...
-10
votes
0
answers
37
views
How can I integrate an AI into an application(Quora) [closed]
I have a school project to clone an application (Quora) and we're asked to implement something that isn't already in the app. I decided on an AI fact checker that will check the validity of posts and ...
0
votes
0
answers
24
views
Wix Visual Glitch After Minify
So i have been building a Website on Wix for a while. i work with alot of iFrames and Velo. Today i decided to to minify everything which made the Site way faster, however switching Tabs on my Tabbed ...
0
votes
1
answer
39
views
New line in a X post
I wrote a browser extention for social media handling.
You can e.g. reformulate your given text to make it more positive etc.
Now if I insert the response to the X - Reply Textarea back it does not ...
-1
votes
0
answers
20
views
react native app immediately shutting down [closed]
i have built my android app using react native .. it has installed on the emulator .. but when i open it it is immediately shutting down without any error shown
to get the logs to get a run time error ...
-4
votes
1
answer
60
views
Why is the response empty when handling an XmlHttpRequestUpload load event?
I have an XmlHttpRequestUpload with a listener on the load event:
xhr.upload.addEventListener('load', () => {
if (xhr.status === 200) {
resolve(UPLOAD_OK);
}
else {
const message = ...
-4
votes
0
answers
13
views
Netlify function not recognizing my Firebase private key [closed]
My Netlify function is not recognizing the private key in my environment variables, It's recognizing everything but
0
votes
3
answers
115
views
How to block the page from loading in an inline script until async operations finish
I have this embed script that needs to be placed in the head of websites:
<script src="https://www.example.com/track.js?wid=123”></script>
It needs to execute before the page body ...
-2
votes
0
answers
28
views
Get iframe src from external link [closed]
I have an link where always fresh domain update
https://lernodydenknow.info/current_domain?tid=1151232&enc=0&srv=rt_adblock_backup
I want any script that can pick always new domain from this ...
1
vote
1
answer
42
views
MemberExpression evaluation order of null/undefined base
Why does the following code throw TypeError: Cannot set properties of null instead of Error: property key evaluated?
var base = null;
var prop = {
toString: function() {
throw new Error("...
0
votes
0
answers
19
views
Contentful multiple content types filtering
I've an Intros content type in Contentful, and this is some portion of the JSON representation of the content type
{
"name": "Intros",
"description": "Inserted ...
0
votes
1
answer
38
views
Inferring the drawing direction of a rotation+reflection matrix applied to a canvas
I am trying to extract the drawing direction of a DOMMatrix with reflection and rotation applied (using rotate, scale). What I want to know is whether it will draw upwards vs. downwards or leftwards ...
0
votes
1
answer
35
views
Getting Webpack compilation error when finding a module (JSON file) in GitHub Actions
I have a requirement where I need to trigger Cypress tests as per the jobList.json file information. This file will create in run time and sometimes it is creating issue, so I am creating default an ...
1
vote
1
answer
47
views
Drizzle ORM + Postgres, how to specify Postgres database Schema? defaults to public
I am trying to set connection to Postgres from Drizzle, but I cannot set the schema name in the connection string
I tried
postgres://localhost:5432/mydatabase?searchpath=myschema
postgres://...