Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
La implementación de Firebase no funciona dice "Error de análisis: token inesperado =>" en index.js

20:56 error Error de análisis: Token inesperado =>

He estado tratando de implementar la aplicación de reacción que hice, dice Error de análisis: Token inesperado => este error a continuación... Yo uso npm

Aquí está mi index.js (Funciones)

 const functions = require("firebase-functions"); const express = require("express"); const cors = require("cors"); const stripe = require("stripe")("Here comes my API Key from stripe"); // API // - App config const app = express(); // - Middlewares app.use(cors({ origin: true })); app.use(express.json()); // - API routes app.get("/", (request, response) => response.status(200).send("hello world")); app.post("/payments/create", async (request, response) => { const total = request.query.total; console.log("Payment Request Recieved BOOM!!! for this amount >>> ", total); const paymentIntent = await stripe.paymentIntents.create({ amount: total, // subunits of the currency currency: "inr", }); // OK - Created response.status(201).send({ clientSecret: paymentIntent.client_secret, }); }); // - Listen command exports.api = functions.https.onRequest(app); // Example endpoint // http://localhost:5001/challenge-4b2b2/us-central1/api

Intenté reinstalar reaccionar, base de fuego que no funcionó. Entonces comencé con un nuevo proyecto e intenté nuevamente y aquí está el mismo error.

Aquí está mi configuración de eslint (./functions/eslintrc.js)

 module.exports = { root: true, env: { es6: true, node: true, }, extends: [ "eslint:recommended", "google", ], rules: { quotes: ["error", "double"], }, };

Editar: funciona perfectamente en el host local y este es el único error que encontré durante la implementación (cmd: firebase deployment)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!