Open grahamb opened 3 years ago
Hello, I have the same problem on startup!
OS: Ubuntu 16.04.5 LTS (no Docker or Kubernetes, just simple VM on DO ) Passenger: 6.0.10 NodeJs: 14.17.4
Log output:
(node:28015) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:674:11)
at Object.get (internal/modules/cjs/loader.js:688:5)
at Object.exports.setLevels (/usr/share/passenger/node/vendor-copy/winston/lib/winston/common.js:35:14)
at Object.<anonymous> (/usr/share/passenger/node/vendor-copy/winston/lib/winston.js:84:8)
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 Module.require (internal/modules/cjs/loader.js:961:19)
at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25)
If look into usr/share/passenger/node/vendor-copy/winston/package.json
it's possible to see that it's 1.1.2 version of winston
used, which is incompatible with nodejs
v14+. Winston should be v3+ to work normally with nodejs
v14+. I'm not sure how Passenger use winston
and if it possible to just update this winston
version to newer?
+1
Started running into the same issue after updating the node version to 14.18.2
.
Passenger version is 6.0.12
App 22612 output: (node:22612) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
App 22612 output: at emitCircularRequireWarning (internal/modules/cjs/loader.js:675:11)
App 22612 output: at Object.get (internal/modules/cjs/loader.js:689:5)
App 22612 output: at Object.exports.setLevels (/usr/share/passenger/node/vendor-copy/winston/lib/winston/common.js:35:14)
App 22612 output: at Object.<anonymous> (/usr/share/passenger/node/vendor-copy/winston/lib/winston.js:84:8)
App 22612 output: at Module._compile (internal/modules/cjs/loader.js:1085:14)
App 22612 output: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
App 22612 output: at Module.load (internal/modules/cjs/loader.js:950:32)
App 22612 output: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
App 22612 output: at Module.require (internal/modules/cjs/loader.js:974:19)
App 22612 output: at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25)
Hi @FooBarWidget & @CamJN.
How do you think this should be resolved? Should we update the Winston to its latest version which is 3.6.0 ATM?
Thank you @CamJN, I have just done a fresh setup and this issue has been resolved for me in version 6.0.13
.
Issue report
Fill in as much as possible so that we can understand, find and fix the problem.
Question 1: What is the problem?
When serving a NodeJS app using the latest Node LTS (14.15.5) and latest Passenger (6.0.7) with Apache HTTPD, Passenger logs a warning when the app is started:
I don't have winston in my project, and this stack trace appears to be coming from passenger, not my app.
Question 2: Passenger version and integration mode:
Passenger OSS 6.0.7, Apache HTTPD 2.4
Question 3: OS or Linux distro, platform (including version):
RHEL7
Question 4: Passenger installation method:
Your answer: [ ] RubyGems + Gemfile [ ] RubyGems, no Gemfile [ ] Phusion APT repo [x] Phusion YUM repo [ ] OS X Homebrew [ ] source tarball [ ] Other, please specify:
Question 5: Your app's programming language (including any version managers) and framework (including versions):
Node 14.15.5 LTS
Question 6: Are you using a PaaS and/or containerization? If so which one?
No