<p>I am running the following command to start a k8s pod</p>
<p><code>kubectl run api --image=corina1998/api --env=&quot;PORT=3000&quot; </code></p>
<p>And I get the following error in the pods' logs of my api service. This is the output of kubectl logs api command:</p>
<pre><code>&gt; nodejs-boilerplate@1.0.0 start-docker /usr/src/app
&gt; node src/start.js

internal/fs/utils.js:332
    throw err;
    ^
Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:617:3)
    at tryReadSync (fs.js:382:20)
    at Object.readFileSync (fs.js:419:19)
    at /usr/src/app/node_modules/docker-secret/dist/index.js:16:18
    at Array.forEach (&lt;anonymous&gt;)
    at getSecrets (/usr/src/app/node_modules/docker-secret/dist/index.js:12:15)
    at Object.&lt;anonymous&gt; (/usr/src/app/node_modules/docker-secret/dist/index.js:30:19)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32) {
  errno: -21,
  syscall: 'read',
  code: 'EISDIR'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodejs-boilerplate@1.0.0 start-docker: `node src/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodejs-boilerplate@1.0.0 start-docker script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

</code></pre>
<p>What could be the problem and how could I debug?</p>

Corina M
<p>I solved this weird problem by removing package-lock.json, rerun npm install to generate a new package-lock.json file, then I rebuilt the image and now it works. I use previously a combination of yarn install and npm install with affected my package-lock.json file.</p>
