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

173
Views
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 answers
Answer question

0

Add to your package.json:

"type": "module"
about 4 years ago · Juan Pablo Isaza Report
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!