I had a express application and I used this application in my Kubernetes cluster.
This application is auth service for my micro service architecture study.
I use Skaffold dev command for applying Kubernetes for this app.
My Dockerfile is like that:
FROM node:alpine
WORKDIR /app
COPY package.json .
RUN npm install
COPY . .
CMD ["npm", "start"]
And I run it with "Scaffold dev" command
And I getting error like that:
...
...
Deployments stabilized in 3.752 seconds
Watching for changes...
[auth] npm notice
[auth] npm notice New patch version of npm available! 7.5.1 -> 7.5.4
[auth] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.5.4>
[auth] npm notice Run `npm install -g npm@7.5.4` to update!
[auth] npm notice
[auth] npm ERR! path /app
[auth] npm ERR! command failed
[auth] npm ERR! signal SIGTERM
[auth] npm ERR! command sh -c node server.js
[auth]
[auth] npm ERR! A complete log of this run can be found in:
[auth] npm ERR! /root/.npm/_logs/2021-02-19T16_46_28_956Z-debug.log
And my package.json file :
{
"name": "authservice",
"version": "1.0.0",
"description": "Auth Service",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"keywords": [
"auth",
"user"
],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.0",
"body-parser": "^1.19.0",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-rate-limit": "^5.2.3",
"jsonwebtoken": "^8.5.1",
"mongoose": "5.10.19",
"morgan": "^1.10.0",
"multer": "^1.4.2"
},
"devDependencies": {
"nodemon": "^2.0.6"
}
}
How can I solve this error?