Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

critical error in docker (any image newer than 092ebb) #550

Closed
2 of 4 tasks
Rongronggg9 opened this issue Oct 13, 2021 · 1 comment
Closed
2 of 4 tasks

critical error in docker (any image newer than 092ebb) #550

Rongronggg9 opened this issue Oct 13, 2021 · 1 comment

Comments

@Rongronggg9
Copy link

Rongronggg9 commented Oct 13, 2021

Any image newer than 50f7ce

Demo or Self hosted

  • Demo
  • Self hosted

Describe the bug
Got a critical error (cross-env not found) that make the bot completely fail to start when running in docker, using any image newer than 50f7ce (50f7ced, included):

> noderssbot@0.10.1 start-withsnapshot
> cross-env NODE_PRODUTION=true node --heapsnapshot-signal=SIGUSR2 dist/source/index.js

sh: cross-env: not found

To Reproduce
Steps to reproduce the behavior:

docker run --name rssbot -d -v /var/data:/app/data/ -e RSSBOT_TOKEN=123456:abcdef123456-U fengkx/rssbot

Expected behavior
Dep cross-env should exist and not lead to a critical error.

Screenshots / Logs
See above.

Any image newer than 092ebb but older than 50f7ce

Demo or Self hosted

  • Demo
  • Self hosted

Describe the bug
Got a critical error (Cannot find module 'fastq') that make the bot fail to initialize when running in docker, using any image newer than 092ebb (092ebb0, included) but older than 50f7ce (50f7ced, not included):

{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.351Z"}
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'fastq'
Require stack:
- /app/dist/source/utils/fetch.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/app/dist/source/utils/fetch.js:28:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/dist/source/utils/fetch.js' ]
}
{"message":"child process exit","code":1,"signal":null,"level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:54.642Z"}

To Reproduce
Steps to reproduce the behavior:

docker run --name rssbot -d -v /var/data:/app/data/ -e RSSBOT_TOKEN=123456:abcdef123456-U fengkx/rssbot:092ebb

Expected behavior
Dep fastq should exist and not lead to a critical error.

Screenshots / Logs

> noderssbot@0.10.1 start-withsnapshot /app
> cross-env NODE_PRODUTION=true node --heapsnapshot-signal=SIGUSR2 dist/source/index.js

{"message":"sqlite does not support inserting default values. Set the `useNullAsDefault` flag to hide this warning. (see docs http://knexjs.org/#Builder-insert).","level":"\u001b[33mwarn\u001b[39m","timestamp":"2021-10-13T17:22:54.075Z"}
{"message":"Database is located in /app/data/database.db","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.245Z"}
{"message":"Using Default language is zh-cn","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.246Z"}
{"message":"send the latest 10 items for each feed","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.249Z"}
{"message":"NodeRSSBot is ready","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.249Z"}
{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.351Z"}
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'fastq'
Require stack:
- /app/dist/source/utils/fetch.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/app/dist/source/utils/fetch.js:28:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/dist/source/utils/fetch.js' ]
}
{"message":"child process exit","code":1,"signal":null,"level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:54.642Z"}
{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.647Z"}
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'fastq'
Require stack:
- /app/dist/source/utils/fetch.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/app/dist/source/utils/fetch.js:28:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/dist/source/utils/fetch.js' ]
}
{"message":"child process exit","code":1,"signal":null,"level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:54.896Z"}
{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:54.900Z"}
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'fastq'
Require stack:
- /app/dist/source/utils/fetch.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/app/dist/source/utils/fetch.js:28:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/dist/source/utils/fetch.js' ]
}
{"message":"child process exit","code":1,"signal":null,"level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:55.159Z"}
{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:55.163Z"}
internal/modules/cjs/loader.js:892
  throw err;
  ^

Error: Cannot find module 'fastq'
Require stack:
- /app/dist/source/utils/fetch.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/app/dist/source/utils/fetch.js:28:33)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/dist/source/utils/fetch.js' ]
}
{"message":"child process exit","code":1,"signal":null,"level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:55.405Z"}
{"message":"Migrate schema to latest version","level":"\u001b[32minfo\u001b[39m","timestamp":"2021-10-13T17:22:55.411Z"}
{"message":"fetch process exit too much(3) times","level":"\u001b[31merror\u001b[39m","timestamp":"2021-10-13T17:22:55.473Z"}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! noderssbot@0.10.1 start-withsnapshot: `cross-env NODE_PRODUTION=true node --heapsnapshot-signal=SIGUSR2 dist/source/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the noderssbot@0.10.1 start-withsnapshot script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-10-13T17_22_56_062Z-debug.log
@Rongronggg9 Rongronggg9 changed the title critical error on any docker image newer than fecc11: "sh: cross-env: not found" critical error in docker (any image newer than 092ebb) Oct 13, 2021
@fengkx
Copy link
Owner

fengkx commented Oct 16, 2021

Thanks for reporting, Fixed in 05acb07

@fengkx fengkx closed this as completed Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants