6,801 questions
0
votes
0
answers
31
views
An array of promises are all fulfilled by the same asynchronous task with correct return value, but some of them are with undefined value? [duplicate]
I am having an issue with a node.js function that basically works like Array.map() but with the additional capability of limiting how many callbacks are running concurrently (like a mini task ...
-7
votes
1
answer
114
views
I got this error in React - "Uncaught TypeError: Cannot read properties of undefined (reading 'match')" can someone help me please? [closed]
I'm creating a video game search app. I'm using an API so that clicking a searched game card takes you to a new page that contains images and a brief intro about the game. However, this does not work, ...
2
votes
2
answers
224
views
Bitwise division in C : Programme seems to work for other numbers but when the divisor is 0 it returns 11 for no apparent reason
I am trying to solve the problem posed in this question which asks that division of two numbers be performed in a bitwise manner. So, I wrote the following functions.
sum() adds two numbers.
larger() ...
0
votes
0
answers
52
views
Codeigniter 3... Undefined Property $Ngetest
Models: Ngetest.phpp
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Ngetest extends CI_Model
{
public function showEcho()
{
return "naisu";
...
0
votes
0
answers
76
views
Error: Undefined Mixin in Nuxt 3 when using Sass — "Pre-transform error: [sass] Error: Undefined mixin." I'm working with a Nuxt 3 project
I'm working with a Nuxt 3 project, and I'm getting the following error related to Sass mixins when I try to run the dev server:
➜ DevTools: press Shift + Alt + D in the browser (v2.5.0) ...
1
vote
0
answers
36
views
Javascript TypeError undefined on for loop only (not off-by-one) [duplicate]
I have a function that gets called when you click a button. I'm checking to see if the clicked item has the class "itm-active". If it does, don't do anything. Else check for elements that ...
0
votes
0
answers
39
views
NestJS: After adding a new module and injecting services from other modules, application stopped working
I'm building a backend application using NestJS, and everything was working smoothly. Recently, I added a new module and attempted to use services from existing modules within it. However, after ...
0
votes
0
answers
77
views
In React + TypeScript, when should a prop be prop?: Type vs prop: Type | undefined? [duplicate]
When designing TypeScript props for React components,
I'm sometimes unsure whether I should type props like:
prop?: Type
or
prop: Type | undefined
My understanding so far:
prop?: Type
The prop ...
0
votes
0
answers
91
views
When submitting data through an EJS form, all data get returned as "undefined"
I'm currently trying to make a login and signup form using EJS, Express, Node, etc. However Whenever I submit data from a form, all data is being returned as "Invalid"
I've checked my user ...
2
votes
2
answers
136
views
Why are my songs showing up as undefined?
Working in p5.js on a class assignment. We have to make a music player. I found a tutorial in the site, but despite copying the code near-exactly (only altering so as to implement multiple songs), I ...
0
votes
0
answers
23
views
Undefined reference to inherited Methods [duplicate]
I'm trying to implement two Classes - 'EditObject' and 'ProgressObject'.
Progressobject is supposed to inherit from EditObject, all its variables and Methods.
When I try to use Methods from '...
0
votes
1
answer
109
views
Type similar to Record<A, B> but saying that not for every A there is a B value (not even an undefined)
Record is defined as follows:
/**
* Construct a type with a set of properties K of type T
*/
type Record<K extends keyof any, T> = {
[P in K]: T;
};
It is defined such that for a Record&...
0
votes
2
answers
102
views
What does the empty function body return in JS?
Does an empty function body implicitly return undefined in JS?
console.log((() => {})())
Clearly it does right? The console outputs undefined in the example above...
// but let's do ...
2
votes
1
answer
115
views
Why can for...in loop run on undefined?
Why does this code work?
for (const i in undefined) {}
From for...in - JavaScript | MDN:
The for...in statement iterates over all enumerable string properties of an object (ignoring properties keyed ...
2
votes
2
answers
133
views
TypeScript ignores explicit undefined type annotation
When I specify a type of foo|undefined for myConst below, type inspection correctly tells me that myConst has a type of foo|undefined on that line. However, in the next line down, type inspection says ...
0
votes
0
answers
20
views
Set DatePicker to null when getting ESLint and Prettier errors for null and undefined?
I am trying to give my custom DatePicker an initial value of null/make the date empty. I've tried setting the initial state to both null and undefined, but I get either a ESLint or Prettier error that ...
1
vote
0
answers
31
views
holder.js has 'global is undefined' error
When I tried to use holder image within the below code:
import { run as runHolder } from "holderjs/holder";
import React, { Fragment, useEffect } from "react";
import { Image } ...
0
votes
0
answers
47
views
Testing undefined, failing in JS
In an Express app I have the following JS code (server side) in a middleware to check that a user provides an adequate token. This is only the relevant part for my question:
const authHeader = req....
2
votes
0
answers
62
views
"Cucumber @ParameterType Named Parameter Not Recognized in IntelliJ"
I'm using @ParameterType in Cucumber to define a custom type and assigning a name to it. However, when I reference this name in my @Then step definition, the step in my feature file still shows as ...
0
votes
0
answers
50
views
Uncaught TypeError: Cannot read properties of undefined (reading 'refs') in React Js using NX monorepo
Getting this error while closing the modal from closeModal component. I have written path replace using history.push() function.
Ex.
const OnClose = () =>{
history.push({
pathname: "/...
-3
votes
1
answer
118
views
Typescript: undefined property cast check?
We ran into the issue that a property was undefined even though the type doesn't allow it. Turns out the way we create the object in place has some issues. I made a small example which the linter ...
0
votes
2
answers
67
views
Cannot Read Properties of undefined in a 2-Dimensional Matrix, HTML & Javascript
I'm working on creating a pixel-based light in the dark simulation with JavaScript to improve my coding skills. The goal is to create a bubble of light around the cursor as it moves. I'm only ...
-2
votes
1
answer
50
views
How to solve undefined property $xx in the public function __construct at a controller on Codeigniter 4.5.5
I got
undefined property $Surat when defined an object called Surat
at a controller on Codeigniter 4.5.5
This is the controller file
<?php
namespace App\Controllers;
use App\Controllers\...
0
votes
0
answers
26
views
Function in flask app can't find variable, but online flask debugger can [duplicate]
I've been working on a python web development course, and my course wants me to make a website that lists some cafés in London. I'm trying to code the functionality to add a café, but when I run the ...
0
votes
1
answer
153
views
Why do I get a linker message: undefined reference to `Date::Date(int, int, int)' [duplicate]
Doing the problems in a popular textbook, I got a error when using a member function in a struct:
.../s09-04-02.cpp:30: undefined reference to `Date::Date(int, int, int)'
// s09-04-02.cpp simple ...
0
votes
1
answer
49
views
Jquery: Each inside each not recognizing pre-defined array
I'm trying to create an array that keeps track of which lines are already hit so they aren't checked repeatedly if I allow the game to continue until another bingo is hit. This is where my problem is ...
1
vote
1
answer
86
views
The method 'createTicker' isn't defined for the type
I was trying to create a simple ticker:
Ticker? ticker;
@override
void initState() {
super.initState();
ticker = createTicker(tick);
ticker!.start();
}
@override
void dispose() {
ticker?....
0
votes
1
answer
75
views
type data for props undefined in local component vue3.js with import tag Vue3, Vue3 needed for a alone page
The use-noms-cpnt component is as follows:
<div id="app">
<use-noms-cpnt></use-noms-cpnt>
</div>
I have an App component and an App mounted like this, I put a props ...
-1
votes
1
answer
48
views
environmental variables accessing in backend files [duplicate]
The following is the tree structure of the files file tree
This is code with error :
mailtrap.config.js
import { MailtrapClient } from "mailtrap";
import dotenv from "dotenv";
...
-2
votes
2
answers
65
views
Function return undefined [duplicate]
I have a function that return a undefined thing even if it normally need to return something defined.
I have this code with a function:
const GtfsRealtimeBindings = require("gtfs-realtime-...
0
votes
2
answers
79
views
How to use public functions in other source code files in golang?
Here is my codes.
//main.go
package main
import (
"fmt"
)
func main() {
bc := NewBlockchain()
bc.AddBlock("Send 1 BTC to Ivan")
bc.AddBlock("Send 2 more BTC ...
0
votes
0
answers
18
views
Digital Root Function returns "undefined" [duplicate]
I'm new to programming!
Trying to write a function that obtains the digital root of a number.
Currently struggling with the "for loop" and "if else" portion of the formula that ...
1
vote
0
answers
34
views
API FOR JS loop giving undefined at end of data
I am working with this Github code. https://github.com/He3556/Mixcloud-Unfollowers
the issue I am facing is that it seems that at the end of the API page, the for loop gives me undefined on the ...
0
votes
0
answers
81
views
Server Timing API - There's undefined and unexpected png on my running browser
I got a weird issue when I was working on html, js.Below is what I got, the point is that when I sent the same code to other computer, it works well with the data, and I also got a line of "...
0
votes
2
answers
148
views
Why Google_Service_Drive type is undefined
Please someone help me with this.
Why the Google_Service_Drive is undefined? I Has installed the google/apiclient and do the configuration on .env file but it still says its undefined.
I've been tryng ...
0
votes
1
answer
33
views
First Element is Undefined in Drop Event Handler using jQuery UI Draggable and Droppable
I'm working on a web application (via python Flask server) using jQuery UI's draggable and droppable features. I have draggable elements that are supposed to be combined when dropped into a droppable ...
0
votes
1
answer
344
views
In Alpine.JS, this.property inside method is undefined
I have a request for help with Alpine.JS
I have a packetaApiKey property defined. When I access it this.packetaApiKey in the pickPoint method, it works as expected. But in the showSelectedPickupPoint ...
0
votes
1
answer
63
views
Angular - TypeError: Cannot read properties of undefined (reading 'forEach')
I am trying to read the roles array from this object and getting the error:
TypeError: Cannot read properties of undefined (reading 'forEach')
Code:
this.data.roles.forEach(role => {
this....
2
votes
1
answer
182
views
Can TypeScript specify keys that are allowed to not exist, but cannot be assigned to `undefined`? [duplicate]
Summary
I want to disallow any explicit undefined value while still allowing implicit undefined values.
Background
In JavaScript, we have this behavior where accessing a key that does not exist yields ...
1
vote
2
answers
95
views
Empty vs. Undefined in Javascript [duplicate]
In Javascript, if I make an array using Array(10), it creates an array with 10 empty items. If I access any item in that array, it returns undefined. However, if I create an array with a length of 10 ...
0
votes
1
answer
107
views
Having an issue with Tyranobuilder, unexpected character issue
I am building a game using Tyranobuilder, I defined a character focus behavior on game settings, such that when a character joins the scene and speaks, they will be bright and when another character ...
0
votes
1
answer
49
views
Problem when using loop-generated variables in ansible
What i'm trying to do is generating lots of similar directory trees. I woul like to set a dict which describes the pattern of the tree. Then i want ansible to generate multiple directory trees with ...
0
votes
0
answers
33
views
undefined object while using useContext
This particular things seems happening when i run these codes
AuthContext.jsx:
// context is a state management tool for passing props
import { createContext, useReducer } from "react";
// ...
1
vote
1
answer
5k
views
vuejs3 and vite import.meta.env.VITE_BASE_URL not working
Hello I'm trying to get base url from .env file. And I'm getting undefined.
I have tried some stack overflow answers and documentation but it didn't help.
console.log('env', import.meta.env....
-1
votes
1
answer
353
views
Facing error while making iOS build in xcode 15.2
`Failed to build iOS app in Xcode 15.2. I am facing this errors ("ld: Undefined symbols" and "clang: error: linker command failed with exit code 1 (use -v to see invocation)"). ...
0
votes
0
answers
36
views
Uncaught Error: Cannot read property 'navigate' of undefined
I'm trying to implement a very simple navigation in react native. I'm trying to navigate from the Home Screen by clicking a button to go to a Details Screen. When clicking the button I get this error: ...
1
vote
1
answer
107
views
React component receiving undefined props
I have a simple React app(created with vite), where i am passing a list of objects to a component Carts, Carts component simply parses the list and returns JSX.
But there is a error pointing that the ...
0
votes
0
answers
19
views
My php form on my website is ending blank submissions to my email [duplicate]
Below is the php code i have on my website. We have been getting some email form submissions that are working but we have also been getting a large amount of empty submissions. When i try to submit a ...
1
vote
0
answers
42
views
TypeError: Cannot read property 'explorerPage' of undefined
I am upgrading jest from version 23 to 29. My project used to work fine before the upgrade, suddenly started observing this issue. I use Typescript as a language.
TestPageDefs Module looks like below:
...
0
votes
0
answers
65
views
JS class variable is always undefined even though it's assigned and is never assigned to undefined, inconsistently showed by DevTools as well
I am having a strange situation where a variable is assigned (and I made sure the assigned value is not undefined) but the value is always undefined. Strangely enough when inspecting the value by ...