Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
I cannot display a page of my website, i tried debugging Uncaught Syntax Error 1: import { useState } from 'react'

A page on my site is not showing on my localhost. I do not understand why.

The Home page is displayed correctly :

J'arrive bien à afficher l'index.js

but when i click Sell Digital Asset it doesn't work... Nothing is displayed, we just have the header :

Just the header like the home page

when I do a debug on create-item.js (the file of the page i want display) it gives me this :

    /usr/local/bin/node ./pages/create-item.js
Process exited with code 1
Uncaught SyntaxError ...(personal information)/pages/create-item.js:1
import { useState } from 'react'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1032:15)
    at Module._compile (node:internal/modules/cjs/loader:1067:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)

Does someone have an idea ? thank you

Regards, Max

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Add to your package.json:

"type": "module"
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda