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
Add to your package.json:
"type": "module"