Hello- I’ve read over some other posts that have had a similar problem deploying an Express/TypeScript application, and tried the suggested fixes, but am still getting errors.
Here are my variables in settings:
branch - main
root dir - (left blank)
build command - npm ci; npm run build
start command - npm run start
here’s part of my package.json:
“main”: “index.js”,
“scripts”: {
“build”: “npm install && tsc”,
“start”: “node index.js”
}
text of the error:
Nov 27 06:41:02 PM > page-two-server-ts@1.0.0 start /opt/render/project/src
Nov 27 06:41:02 PM > node index.js
Nov 27 06:41:02 PM node:internal/modules/cjs/loader:959
Nov 27 06:41:02 PM throw err;
Nov 27 06:41:02 PM ^
Nov 27 06:41:02 PM Error: Cannot find module ‘/opt/render/project/src/index.js’
But, my index.ts file is indeed in a “src” folder, which is at the main level of the repository. Ideas?
Thanks
-D