I must be missing something small here.
My package.json has the following structure:
"scripts": {
"start:react": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"start": "node ./src/express.js",
"seed:dev": "nodemon ./src/backend/seed.js",
"start:dev": "nodemon ./src/express.js",
"db:build": "node ./src/backend/seed.js",
"test:watch:db": "jest --watchAll --runInBand --verbose db"
},
And as mentioned above earlier in the thread, I ran:
Build Command:
npm install;
Start Command:
npm start
This gets the web server running. I run into issues when trying to run npm run db:build
to seed my psql database, which I connected with the Internal Database URL and saved into my Web Service’s Environment Variables.
When running npm run db:build, I receive the following output:
> turtles_v.1@0.1.0 db:build
> node ./src/backend/seed.js
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/opt/render/project/src/src/backend/seed.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
As for my project directory:
render@srv-cdcrhh6n6mpsbhf4kvb0-6576d699f9-rdvgk:~/project/src$ ls
NOTES.md README.md node_modules package-lock.json package.json public src
With the next level down being:
render@srv-cdcrhh6n6mpsbhf4kvb0-6576d699f9-rdvgk:~/project/src/src$ ls
README.md backend diagrams express.js frontend index.css index.js jest logo.svg reportWebVitals.js setupTests.js
Am I missing anything?
Something tells me its miniscule.
Thanks again!