Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
3 answers
30 views

How can I store the response of my axios get request as json in node.js?

I'm trying to send a request to an api using axios and store the json response in a variable. When I output the response to the console, it shows it, but when setting a variable equal to it and ...
LanSsd Sdftytgk's user avatar
0 votes
1 answer
34 views

change string to object

how to change string to object {'username': [ErrorDetail(string='A user with that username already exists.', code='unique')], 'email': [ErrorDetail(string='user with this email already exists.', code='...
S.W.A.T verseau's user avatar
0 votes
0 answers
18 views

My VScode does not watch when I use "-w" flag in my package.json

I'm working on a SASS and Bootstrap project in VScode and facing an issue where SASS doesn't watch or compile when I use the "-w" flag. It compiles without the "-w" flag but doesn'...
Amin's user avatar
  • 59
0 votes
0 answers
24 views

Accessing API in Node to the React NextJs throwing error

import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";^^^^^^ SyntaxError: Cannot use import statement outside a moduleat wrapSafe (node:internal/modules/cjs/loader:...
Mohan Mickel's user avatar
1 vote
1 answer
29 views

Import JSON as a variable only to get its type and ensure the import gets removed when compiled

I have a JSON file that is auto-generated in my repo, a TypeScript backend project with Node as target runtime. I import the JSON file like this, just to get the type of the JSON object: import ...
v-moe's user avatar
  • 1,353
0 votes
0 answers
15 views

Exception caught by widgets library ═RangeError (index): Invalid value: Valid value range is empty: 0

i am having this error i tried to use list of cart from api getcartproducts to store in products list then to use in my widgets i don't know what is the issue! if some one can help me i am not expert ...
MOHAMED AMIIN ABDI AADAN's user avatar
0 votes
1 answer
25 views

How to test links in a JSON file?

I have a database in JSON containing multiple links and I cannot find a library to crawl it for valid and invalid links. I want to test each URL inside to look for broken links. Property example: { ...
djibe's user avatar
  • 2,922
0 votes
0 answers
32 views

I get a Cannot POST /login error when i'm not sending a POST request to the /login endpoint

I'm building a web application where users can register and login using Node.js, Express, and a PostgreSQL database. However, I'm encountering an issue with my frontend and backend communication. When ...
rbt's user avatar
  • 1
1 vote
2 answers
44 views

What is the difference between using express.urlencoded() with extended set to true vs set to false + manual JSON stringify/parse calls?

In my NodeJS/Express server I must choose between setting extended to true or to false for the urlencoded middleware: app.use(express.urlencoded({ extended: true/false })); I understand that if we ...
Oscar R's user avatar
  • 452
0 votes
0 answers
30 views

How to handle circular references in TypeScript when serializing objects to include `$ref` annotations

I have an object structure where circular references need to be represented using $ref annotations in the output. Here is an example of the input and expected output :- Input is - const obj2 = { ...
Rohit Desai's user avatar
0 votes
0 answers
53 views

Why is my AJAX request not working in Node.js and Express project?

I'm trying to make a request using ajax to my backend, but it always returns a 404 error, but my route exists. Project structure: public -scripts --script.js routes -chats.js views -chats.ejs index.js ...
Gomaink's user avatar
0 votes
1 answer
96 views

FedEx API Rate Quote Returns 404: "The resource you requested is no longer available"

I'm trying to integrate the FedEx API to get shipping rate quotes in my Node.js application. I've followed the documentation, but I'm consistently getting a 404 error with the message: "The ...
Bigshow77's user avatar
1 vote
1 answer
59 views

ts-node shadows import path with JSON files, but TypeScript does not raise issue at compile time

When the "resolveJsonModule" compiler option is specified, TypeScript appears to have very unusual behaviour if a JSON file has the same name as a TypeScript file: myModule.json { "...
Maddy Guthridge's user avatar
0 votes
0 answers
12 views

HTML Static S3 site triggers APIG & Lambda & SES - but JSON field content not coming through into email

Have S3 Static site configured Contact form triggers API Gateway to Lambda to SES When receiving the email - all field content is 'undefined' Website is successfully triggering lambda and SES Postman ...
Jack Creager's user avatar
0 votes
2 answers
56 views

FormatException: SyntaxError: Unexpected end of JSON input

I am getting this error in my flutter app during the api integration phase. I have checked the backend apis through postman they are working fine. But when i integrate it with frontend and then check ...
Octyl Acetate's user avatar

15 30 50 per page
1
2 3 4 5
786