Why is it showing this error Couldn’t find a package.json file in “/opt/render/project/src” ?
My package.json file is:
{
“dependencies”: {
“cors”: “^2.8.5”,
“dotenv”: “^16.3.1”,
“express”: “^4.18.1”,
“mysql”: “^2.18.1”,
“mysql2”: “^3.6.5”,
“nodemon”: “^2.0.19”
},
“name”: “backend”,
“version”: “1.0.0”,
“main”: “index.js”,
“type”: “module”,
“scripts”: {
“start”: “node index.js”
},
“keywords”: ,
“author”: “”,
“license”: “ISC”,
“description”: “”
}
Hi,
That error would imply the package.json
file is not in the root of your repo.
You’ll need to reference the path to the file. Maybe the “Root Directory” setting could help.
Alan
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.