Category "javascript"

Metro Builder: SyntaxError: Unexpected token = after upgrading to React Native 0.65.1

Today I updated to React Native Version 0.65.1. After that I was unable to Start the Metro Server I am now receiving following error message while building a Re

Next.js API routes all return "Interval Server Error" in production, but all the routes work in development

Whenever I go to any API route in my Next.js app in production it returns a 500 "Internal Server Error" but in development, all of them work completely fine and

countDocuments() is not working in api call

I am trying to get a count of products using api calls but in postman its keep loading router.get(`/get/count`, async (req, res) => { const productCount =

Use access token from first fetch in a second fetch API in React JS

As a newbie to React I have been stuck for awhile on how to get my access token to be put to use in a second fetch API. In the first fetch (Get token), I am abl

How to convert Khan academy code to p5.js

I'm using the https://editor.p5js.org/Josef37/sketches/RGDv9lHkK for convert to p5.js and I'm still don't know how to convert 100% correct, the picture won't sh

How can i disable the Maximize button for BrowserWindow in Electron?

Im new to Electron.js and im trying to disable the Maximize button, i know its possible but i don't know how to do it. I tried frame: false but its not working

Best practice for importing component from components library in React.js

When I create components in React, they're all in a folder called component and each component has a dedicated folder with the same name as the component itself

MongoStore.create({ ..............Cannot read property 'create' of undefined

I have tried every possible step I've come across but the problem doesn't resolve. The error shows: C:\Users\...............\server.js:35 store: MongoStore.crea

how to pass variable between to vue file?

how to pass variable between to vue file ? Hello, this is my file SendCode.vue has variable NewEmail which I want to use it in another file changePass.vue . Is

Get the edited content in tinyMCE 6

I am integrating TinyMCE in my ember.js app. Unfortunately I cannot get back the edited content, or at least, all of it. tinymce.init({ selector: '#'+

What's the maximum precision (after the decimal point) of a float in Javascript

An algorithm I'm using needs to squeeze as many levels of precision as possible from a float number in Javascript. I don't mind whether the precision comes from

Reactjs recorder-js download

I am trying to make a React app for recording voice samples and save them as wav files, I used recorder-js to make the record but I am still struggling to make

Client-side jwt token storage

I need advice, what is the best way to store a JWT token? Should we store in cookies or storages? But with the CSRF flaw and xss attacks I have a doubt. I'm sti

why I can't get all folder's module with require('./folder')

i am using this: index.js functions └abc.js └reset.js functions.js functions.js const fs = require("fs") const functions_ = {} const files = fs.re

Running an if statement inside a querySelectorAll Node List

I am building a blog post layout which requires some metadata to sit on one side and stay in place as the content scrolls, using position: sticky. This works fi

R - networkD3 issues

I am using networkD3 in R to display my data (sankeyNetwork function). I ran into several issues that do not seem to have solutions available. Issue 1: If node

How can I add a label to a checkbox dynamically

I want my checkboxes to look like this: <input type="checkbox"name="id">Check 1</input> <input type="checkbox"name="id">Check 2</input>

Webpack in ES6 create an empty bundle

I am trying to use webpack in ES6 but there is something wrong, the bundle is created but it seems to contain nothing. src/index.js console.log("inside"); expor

Jquery datatables custom button for export

I have a data table that has 2 buttons, the export for pdf and csv. My colleague asked me if possible, there is only one button in the table and when the user c

i'm trying to make my discord bot to record audio using prism-media as said in the example of @discordjs/voice but i'm getting error

I'm making a discord bot that records the voice channel the libraries [email protected], @discordjs/[email protected], [email protected] my imports const { createWrit