Category "javascript"

Can not get Facebook email for React Login/Register

I can not get the Fb profile email for React Login/Reg and can not find how to solve it. I need to get data and post my other Api. Name, picture and id comes, b

how to spy on window.location functions?

i need to cover my code with some unit tests and in one of then i have the following situation. app.tsx async someMethod( . . . windo

Nested for loop through json object array does not work

I need to build a new array based on json array (Context) bellow. Unfortunately I never reach the outer Loop after passing by first run. Is there any mistake in

Uncaught TypeError: web3 is not a constructor. the blockchain website cannot connect to metamask

i have issue on web3.eth.defaultAccount = web3.eth.getAccounts(); below is the code. it said Uncaught (in promise) TypeError: Cannot read properties of undefine

Unable to positioned the webgl canvas while capturing image

I'm accessing the webcam and trying to take a picture. this is what it looks like before capturing the pic. But this is what I'm getting after taking the pictu

Module parse failed: The keyword 'interface' is reserved (5:0) File was processed with these loaders

It is my first time publishing package to NPM. I have published simple React + TypeScript component to NPM, but when I installed and tested it, I am getting the

Command 'Solidity: Compile Contract' resulted in an error (Cannot read properties of undefined(reading 'uri'))

Good day everyone, I am working on a lottery smart contract. I am currently done with the remix VM tests and proceeded with the unit tests with JavaScript. The

How to add the items from a array of JSON objects to an array in Reducer?

So I am fetching the list of 10 todos from https://jsonplaceholder.typicode.com/todos?_limit=10&page=1 I am updating data with the array of these 10 todos.

The intellij idea takes up a lot of Ram [closed]

The intellij idea takes up a lot of RAM, is there a way we can reduce the program size?

How to load script in react component

I am having following script file <script language="javascript"> document.write('<script language="javascript" src="http://tickettransaction.com/?bid

TypeError: Cannot convert undefined or null to object next.js

Error - TypeError: Cannot convert undefined or null to object This error happened while generating the page. Any console logs will be displayed in the terminal

How to fade smoothly between gradients in JavaScript

This code populates a div with a predefined set of gradients and fades through them in a cycle using jQuery's .animate() method: /// Background Gradient Cyc

How can I connect twice to db in Cypress tests?

I need to connect to my db (Postgres) twice during autotest - at the beginning to truncate and at the end to select a new note from the table. I tried to do it

Show "loading..." message until get the coordinate

Here I already have the script to get the coordinate (Latitude & Longitude). Since, when I clicked the button, some people wonder when the coordinate will c

How I can simulate the __callStatic property of PHP in Node.js using Proxy?

I'm trying to create the same behavior of PHP __callStatic magic method in Node.js. I'm trying to use Proxy to do that, but I don't really know if it's the best

Not using node.js : Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../"

i have this simple js sample which i test via visual studio code with live preview server build in: i don't use node.js in this sample all js files under js dir

If I have multiple divs on my screen, and on click they all move to the right of the webpage. How can I determine which reached first?

I have a parent class of animal and multiple subclasses like, leopard, caracal and cheetah. They are placed on the web page once their respective buttons are cl

Force Webpack to use ES6 syntax in react-app bundle [duplicate]

My aim would be to have ES6 syntax (or latest one) in my entire react-app built. I've already managed to avoid polyfills in my own code by omi

react-native swipeable gesture not working on android?

I am doing a react native course with Mosh (https://codewithmosh.com/). I am using expo. I am very new to react native and don't really know what I am doing, bu

Reload screen after action - REACT NATIVE

I want to have a screen which contains all my favorite subjects. I have to select these from another screen, with all the subjects. The functionallity behind it