'/opt/render/project/src/node_modules/json-server/package.json' imported from /opt/render/project/src/index.js

i have this error i cant solve this issue
this error

this json file data
“name”: “relife”,
“private”: true,
“version”: “0.0.0”,
“type”: “module”,
“scripts”: {
“start”: “node index.js”,
“dev”: “vite”,
“build”: “vite build”,
“preview”: “vite preview”
“devDependencies”: {
“@types/chalk”: “^2.2.0”,
“vite”: “^5.0.8”
“dependencies”: {
“axios”: “^1.6.5”,
“bootstrap”: “^5.3.3”,
“cros”: “^1.0.1”,
“json-server”: “^1.0.0-alpha.23”,
“sweetalert2”: “^11.6.13”,
“swiper”: “^11.0.5”,
“toastify-js”: “^1.12.0”
and this is repo

in your project settings is the build step:
npm update


npm update downloads the packages that end up in the node_modules folders that are not your source code but the code included by require statement or dependencies in your package.json

good luck


1 Like

what i can do ?

change the line in your package.json, that reads

“start”: “node index.js”,


“start”: "vite preview --host ",

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.