You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the changes on October 24th, the docker image cannot start anymore:
node:internal/modules/cjs/loader:1228
�
throw err;
^
Error: Cannot find module '/app/node'
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Module._load (node:internal/modules/cjs/loader:1051:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.18.0
There are 2 reasons:
The node argument probably needs to be removed from the CMD line since the image already inherits the entrypoint /nodejs/bin/node, so the CMD should only be src/index.js.
The app itself is never copied into any of the images, only the package.json is. You removed most of the COPY lines which also includes copying the javascript files into the image, so the image only consists of node and npm dependencies.
Even after fixing both, the container still crashes with:
(node:1) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/app/src/index.js:2
import RssFeedEmitter from 'rss-feed-emitter';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (node:internal/modules/cjs/loader:1378:20)
at Module._compile (node:internal/modules/cjs/loader:1428:41)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49
Node.js v20.18.0
The reason why I renamed index.js to index.mjs 2 years ago was because of this error.
The text was updated successfully, but these errors were encountered:
Hello, thanks for the input. Please follow the tags for the time being. I know there are issues, but I have not released the version yet, and nowadays sadly I don't have time to focus on this. I'll take care of these as soon as I have more time from my work.
Since the changes on October 24th, the docker image cannot start anymore:
There are 2 reasons:
node
argument probably needs to be removed from the CMD line since the image already inherits the entrypoint/nodejs/bin/node
, so the CMD should only besrc/index.js
.COPY
lines which also includes copying the javascript files into the image, so the image only consists ofnode
and npm dependencies.Even after fixing both, the container still crashes with:
The reason why I renamed index.js to index.mjs 2 years ago was because of this error.
The text was updated successfully, but these errors were encountered: