Questions tagged [undefined]

A variable is undefined if it has not been assigned a value.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

undefined variable of useState object [duplicate]

I'm beginner at using hooks of react I'm trying to use a useState object inside a useEffect , when I set value to an attribute of useState and try to access it , it keep giving error of " ...
the_yaz2000's user avatar
0 votes
2 answers
17 views

Error "Cannot read properties of undefined" when I add a new comment

Error that appears when adding a comment Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'fullName') Source components\Comment\index.tsx (53:50) @ fullName 51 | <...
Bender Rodriguez's user avatar
0 votes
1 answer
28 views

My Nodejs function is returning an Undefined instead of a value [duplicate]

` function summation(num, args=0) { let value = args; value += num; num -= 1; if(num == 0){ return value; } summation(num, value); } console.log(summation(3)); the ...
Macddee's user avatar
  • 11
-3 votes
0 answers
25 views

I wanted to buy btc using binance api in golang using the adshao binance api but I kept on getting this error: undefined: futures.OrderStatusFilled [closed]

I reference the binance packages by "github.com/adshao/go-binance/v2" "github.com/adshao/go-binance/v2/futures" The binance and futures obects are accesible. but when accessing ...
Jesse's user avatar
  • 23
-2 votes
0 answers
23 views

TypeError: Cannot read properties of undefined (reading 'push') in arrays inside an array [closed]

I have to push values in different arrays inside an array , but it's showing me undefined array error although I have initialized and declared it. I was expecting a simple push result of adding 3(...
Shraddha Sharma's user avatar
0 votes
0 answers
4 views

C++ Cannot template abstract factory singleton without undefined error

I'm trying to create an AbstractFactory class that is templated on the base class. The abstract factory is a singleton but when I declare it for a baseclass I get an undefined error. This system works ...
Will Denny's user avatar
0 votes
0 answers
26 views

Base class undefined. How would I go about fixing this issue?

I want to create the object "keyEventsInstance" on the stack as a private member of the class "MultiLauncher" (see MultiLauncher.h) and then have keyEvents::processKey(uint key) ...
LondonNight's user avatar
0 votes
0 answers
25 views

TypeError: Cannot read property "_rangeSliderData" of undefined

As I found, _rangeSliderData is property and put inside plotly.min.js. When I click again on this button (first click is not error) to update then updatePlot will be called along with this error ...
Alkaii Kobayashi's user avatar
-1 votes
0 answers
18 views

A bunch of undefined symbols C++ XCode (Inheritance, Linked Lists) [duplicate]

I get a bunch of undefined symbols for functions that I have defined and implemented properly. This builds properly without code in the main, but once I start adding code, the compiler tells me I ...
crispycalvin's user avatar
-1 votes
1 answer
18 views

Title: JavaScript this behavior inside an arrow function used in Object.defineProperty [duplicate]

Question: I'm encountering unexpected behavior when using an arrow function as a getter in Object.defineProperty in JavaScript. Here's my code: "use strict"; const obj = { a: 10, }; ...
Kübra Aksu's user avatar
0 votes
1 answer
20 views

How to importing library that define "favorites" at Flutter

i am very beginner ..and just start learning flutter. I follow "Your First Flutter App" from Google Codelabs, and stop at this step: https://codelabs.developers.google.com/codelabs/flutter-...
radevpro's user avatar
0 votes
0 answers
22 views

How can i actualize a ref in React?

I have a problem, i am working with React and, i have a Navbar component, a HomePage and inside HomePage i have another component that is Projects, i have a button in the NavBar that when i press it i ...
spider's user avatar
  • 65
0 votes
1 answer
25 views

How should I link load flags to their data in typescript

I have a started flag, and then other data about the progress of some action. let started: boolean = false; let foo: number|undefined = undefined; let bar: string|undefined = undefined; Any other ...
Jacob's user avatar
  • 129
0 votes
0 answers
23 views

ERROR TypeError: Cannot read property 'user' of undefined | React Native

I am currently getting the undefined error. I want to render screens based on the user authentication state. Here's my App.js: import { StyleSheet } from "react-native"; import { ...
Topu Rayhan Rabby Mamud's user avatar
0 votes
0 answers
22 views

react native/expo go: undefined error when trying to open app on iOS simulator

I'm currently doing an tutorial where you integrate AI into an react native app. I?m struggling since 2 days because of an error I get when I try to open the app with the Xcode simulator. I always get ...
linh's user avatar
  • 1
0 votes
0 answers
47 views

Azure OpenAI on nodeJS - Problems configuring Azure Openai

My code was working properly untill I changed my API key to use openai through Azure, this was my old code: const {Configuration, OpenAIApi } = require('openai'); const apiKey = process.env....
Gabriel Savonitti's user avatar
0 votes
1 answer
39 views

Javascript object becomes undefined when appended to another object [duplicate]

I'm trying to fetch some json data, make it into a Javascript object, then assign it to be a child ENFP of the object personalityData. In the code below, I use the function getData to fetch the json, ...
jendeukstan's user avatar
-1 votes
0 answers
19 views

How to solve this error? Uncaught TypeError: Cannot destructure property of 'React.useContext(...)' as it is undefined

I created an react app that uses 2 component: ToastLauncher.jsx ToastSection.jsx The purpose of this app is to display custom toast elements. The ToastLauncher component contains all the required ...
Imaginario27's user avatar
0 votes
0 answers
12 views

Im getting a TypeError: Cannot read properties of undefined (reading 'includes')

I have created this project, using React-Vite for the frontend and Node for the backend. Working in local mode everyrhing works fine, but when i enter the Vercel deployed version I´m getting this ...
RockTheBarrio's user avatar
0 votes
1 answer
21 views

React-Native "undefined is not a function" error when sending a post request from client

Server side code is working properly as I have tested it with thunderclient/postman, and have received the correct response from the external api (fyi, the external api is an api managed by the ...
MVC Developer Team's user avatar
1 vote
2 answers
41 views

Not able to update CartItems in Local Storage

When i click on addproduct then it gives error of undefined.. here is my ProductDetails.js code Why the product setting to localstorage is undefined import axios from "axios"; import React, {...
Suraj Jawrani's user avatar
0 votes
1 answer
33 views

JavaScript function returning undefined. Looping through nodelist of buttons for click event

While trying to adapt my console.log Rock Paper Scissors game to use a GUI - I've setup buttons for the user input but the function I've put together keeps returning undefined (getPlayerSelection). ...
AaronDKP's user avatar
0 votes
2 answers
49 views

JS undefined and NULL checker not working [duplicate]

for(const id of this.extraRooms) { let doesRoomExist = document.getElementById('newRoomAddress' + newRoomId); //if(typeof(doesRoomExist) !== "null") ...
John's user avatar
  • 3,979
0 votes
0 answers
61 views

Why do the elements in my array become undefined when I access them?

I have an array full of video objects. When I print them to the console, there are 30 elements - each an expected video object with the appropriate information. However, when I try to print an ...
Anslean's user avatar
  • 19
0 votes
0 answers
9 views

Referencing error with a variable when trying to render an EJS file to display a table of information from mySQL database

Very new to everything so might be a silly query but I receive this error when I try to click on a webpage that should show a table of data from my mysql database but I receive this error: ...
Siku's user avatar
  • 1
-1 votes
0 answers
40 views

Uncaught TypeError: Cannot read properties of undefined (reading 'length'). (different from past questions)

I'm dying, I swear. I have a react app where I am making a fetch call to a flask app. I am getting a response back in the format that I am expecting. However, I am getting the error: Uncaught ...
William Keck's user avatar
-3 votes
0 answers
12 views

Warning: Undefined variable [duplicate]

I tried the code in php: <?php $count=1; while($Count<100){ echo"<li>Hi,$count</li>"; $count++; } ?> but i got error like this appearing infinity please help to sort-...
Lavan Lav's user avatar
-2 votes
0 answers
9 views

GETTING UNDEFINED JWT WHILE LOGINING

getting jwt undefined while login please guided me how to fetch token from server i want to check weather the login user is authenticated or not so for that i am verify it through using the jwt which ...
hussain ashraf's user avatar
0 votes
0 answers
17 views

cannot use response data in pipe respronse undefined in log

let dataIn:any; const member = (await this.apiGatewayService.userInfo(event.source.userId)) .pipe(map((response) => { console.log("response", response); dataIn = response.data })) ...
1 vote
1 answer
59 views

Undefined variable - why is it used?

I am using Tanmay teaches Julia for beginners. I am working on the Caesar Cipher and there is one variable that is undefined. The variable is "filtered_characters" and I have no clue where ...
NetGary0430's user avatar
0 votes
1 answer
47 views

Fixing "Uncaught TypeError: cannot read properties of undefined (reading 'add') at HTMLDivElement.<anonymous>"

I'm trying to make it so that hovering over any of the squares inside the play area adds the class "darken" to them. The play area generates as expected, but instead of adding the class, ...
Nightman9001's user avatar
1 vote
2 answers
35 views

req.files = undefined (Multer, Express, Typescript)

Im trying to save imageUploads to a folder "/images". My issue is that req.files seems to be undefined for some reason. I will try to send the code I think is relevant. Feel free to ask any ...
mariusep's user avatar
0 votes
1 answer
15 views

TypeError issues and cannot define Identifier

I am creating an app where users can post, comment, like, and unlike another user's post. Everything works great but while I am in a post and refresh that page, I get an error that the id in post.id ...
janestack's user avatar
-3 votes
1 answer
41 views

Type 'undefined' is not assignable to type 'CartItem'

I get the error 'Type 'undefined' is not assignable to type 'CartItem' during running my program, I could not resolve the error :(. import { Injectable } from '@angular/core'; import { CartItem } from ...
Ahmet Yavuz's user avatar
-1 votes
2 answers
106 views

Laravel Vue Inertia Show Component with Data in Dashboard Undefined

I'm practicing a bit with Laravel, Vue and Inertia. I have the following problem now. I have created a Dashboard.vue page and various components that are displayed as a section on this dashboard. ...
Kiezgold's user avatar
1 vote
0 answers
16 views

Golang MissingFieldOrMethod (input.scanUser undefined (type api.User has no field or method scanUser)

I am writing a training tg bot in golang. in the course of work, I decided to make the architecture similar to Handler-> Services-> Repository. The objects with which I will have to work I ...
John's user avatar
  • 43
1 vote
1 answer
33 views

Is there an equivalent of a "possibly undefined" value in a template?

I have code in a Vue component that relies on values that are not guaranteed to be defined (but they become defined later). I wanted to use in <template> a .value? entry, similar to what I use ...
WoJ's user avatar
  • 27.3k
0 votes
2 answers
89 views

Spring Boot Security: Deprecated commands

this is my code and in order to avoid WebSecurityConfigurerAdapter I used SecuirtyFilterChain and UserDetailsService. Now I'm getting an error for the User.Builder() that can not be defined "The ...
Anonymous's user avatar
0 votes
0 answers
40 views

Cannot read properties of undefined - Google apps script

I'm a fairly new user to Apps Script, learning as I go, googling all my questions and ended up here. Very thankful for all the answers I've found thus far. Hopeful you all can help! I have this script,...
Beth Watson's user avatar
1 vote
1 answer
323 views

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'CallCollection')

I try to scan my QR to start the session, but it is showing the following error every time. index.js const client = new Client({ authStrategy: new LocalAuth(), puppeteer: { headless: ...
David Manzano's user avatar
0 votes
0 answers
17 views

function returns undefined result [duplicate]

function generateQuestionIndex() { var index = Math.floor(Math.random() * 8); if (index < 7) { generateQuestionIndex(); } else if (index == 7) { alert('return' + index); return ...
tracey02's user avatar
0 votes
0 answers
21 views

Javascript: The code continues executing before a variable is changed [duplicate]

I'm trying to connect to Google Calendar's API. In fact, I am able to get correctly the JSON back. However, I'm not capable of extracting that JSON to use it later in the code. What happens is that ...
Cuboruby Pro's user avatar
0 votes
0 answers
17 views

Cannot access to a property inside a class method in javascript - NodeJS [duplicate]

I have a problem trying to access to "service" property inside a controller method. I receive the error "Cannot read properties of undefined (reading "service")". I can't ...
Franco Rodriguez's user avatar
1 vote
1 answer
50 views

Getting 'undefined' or 'NaN' for data-addval when trying to get is as number in JS [closed]

I'm building a simple web game and I've been struggling with a problem for hours. No matter how I try to access the data-addval attribute in my JavaScript code, it always returns 'undefined' or 'NaN' ...
Alex-GR's user avatar
  • 13
-2 votes
2 answers
26 views

Create function out of the axios POST that can reused later [closed]

I have an axios.POST that I want to reuse in my code. the then part of my code will be different but when I add the POST part of the code to a function, I am getting the following error: Uncaught ...
nb_nb_nb's user avatar
  • 1,257
0 votes
0 answers
32 views

error Warning: Undefined array key "HTTP_REFERER"

error please help Warning: Undefined array key "HTTP_REFERER" in /home/editoral/domains/editoraleader.com.br/public_html/jornal-leader/wp-content/themes/Newspaper/Newspaper.theme#archive on ...
Claudio Da Silva's user avatar
0 votes
0 answers
38 views

Unhandled Runtime Error: Cannot read properties of undefined (reading 'toString') while trying to send a transaction using the Solana wallet-adapter

I'm following an online tutorial on Solana but I'm stuck when I try to make a new transaction using the Phantom wallet - Create React App keeps showing the error message: Unhandled Runtime Error ...
claywintringham's user avatar
0 votes
1 answer
47 views

How to pass an Object as a prop in Vue js?

I thought passing an Object is simillar to an array, I just simply need to avoid v-for loop. But in this case I'm getting prop as an undefined. <template> <p>{{info.text...}}</p> &...
john's user avatar
  • 23
1 vote
1 answer
45 views

NEXTJS Server Side Rendering Gives Undefined

I am trying to get data as given solution above but still i am getting undefined instead of data but when I send this same request through postman and thunderclient it gives me success with 200 status ...
hassan's user avatar
  • 21
0 votes
0 answers
42 views

Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'Float64Array')

I am migrating an Angular app from v12 to v13 and I experienced the following error: ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'Float64Array') ...
David's user avatar
  • 1

1
2 3 4 5
137