Im trying to deploy an express-node api. I already setting al the enviroment variables and the node version but i have this problem (sorry my first lenguage is spanish).
Error: Cannot find module '/opt/render/project/src/index.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
My package.json
{
“name”: “api”,
“version”: “1.0.0”,
“description”: “api”,
“main”: “index.js”,
“type”: “module”,
“scripts”: {
“build”: “node src --out-dir dist”,
“start”: “node dist/index.js”,
“dev”: “nodemon src/index.js”
},
REPO:GitHub - ZoeBarrios/API_NODE: API desarrollada para la aplicación Adoptando Sonrisas.