The error I get when trying to deploy my service to app engine is:
Error: Cannot find module '/srv/server.js' at
`Function.Module._resolveFilename (module.js:548:15) at
Function.Module._load (module.js:475:25) at Function.Module.runMain
(module.js:694:10) at startup (bootstrap_node.js:204:16) at
bootstrap_node.js:625:3`
I dont have a /srv/server.js and why would it look for it?!?!?
Thanks if you can help!
Check your package.json, you should have at least:
"main": "app.js"
where app.js is your node-file which starts the server.
You could also add:
"scripts": {
"start": "node app.js"
},
and run "yarn start" to test that your server starts ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With