-
Notifications
You must be signed in to change notification settings - Fork 945
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
[node v14.x+] Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency #1077
Comments
@SwapnilSoni1999 I'll take a look, thanks for the report. |
On the following platforms: Ubuntu 20.04 LTSPackage: nodejs
Version: 14.1.0-deb-1nodesource1 ✅ Mac OS X 10.13.6Package: node
Version: stable 14.1.0 (bottled) ✅ |
Me too, script doesn't run and I get the warnings - Node v14.2.0 (Arch Linux) |
same here checked on ubuntu 20.04 and archlinux too |
Please refer to #1075 for more info. |
please explain a bit how this issue is related to the issue you mentioned. |
Same problem with Nodejs Ver 10 and forever 2.0 wont start on windows 10 server 2016... changed roblav96 suggestion #1075 in monitor to string for the file system for the pid and last line erase extra New Line... with same error but different node addresses every time complaining about padLevels... the process does not start ... please help |
Unfortunately this cannot be easily fixed on forever side - reason for the problem is this - winstonjs/winston#1797 Best solution would be to drop dependency on Winston altogether and replace it with something like pino, but unfortunately that would take way more time than I currently have. PRs welcome. In the meantime, I would recommend to use alternatives to forever, such as pm2 or nodemon on Node 14. |
@SwapnilSoni1999 I don't think it should prevent application from starting, it's just a warning. As @naeem518 has mentioned, there was another problem, that was fixed in #1075, that might have prevented forever from working in certain cases. You can try forever 3.0.0 and see if it works any better for you. |
@kibertoad sure sir just give some time and I'll check |
@kibertoad Thank you for releasing new version! |
Confirming with @sapics said. I am on Ubuntu@16.04, Node@14.2.0. After upgrading from Forever 2.X to Forever 3.0.0,
But at least the forever process starts and continues to run unlike before! |
Hi @akircher ! |
Still having this problem over a month from this being logged. |
which os? |
You can update your dependencies to |
Any news when it'll be a fix? adding winston@2.4.5 also not working. |
winston@3.x has been released quite some time ago. Would upgrading to v3 fix this issue? https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md |
Is there any solution to this please? I'm running:
...and I'm getting the following error:
...and, nothing runs :( |
I am the exact same as @KemikalGeneral except node v14.13.1. Running on a Linux server (standard Amazon EC2 Linux image). |
Using official docker image for node 14.13.1 (-stretch) and Forever 3.0.2 and I get: $ forever --version |
warn: --minUptime not set. Defaulting to: 1000ms Steps to reproducenpx express-generator --view twig |
If someone would contribute a PR to update Winston version used in forever, that might help (if they fixed the issue there) |
I had the same issue after updating my Nodejs to version 14, but after checking the warnings I realised the problem was caused because of using an old version of npm package for Sqreen (Sqreen protects applications against common security threats). As soon as I updated my Sqreen package, my issue was solved. Use trace warning command to get detailed information of the warnings. |
Also getting the same errors as above
|
And I have the same error, Node: v15.2.1, Forever: v3.0.4, OS: Windows 10. |
And I have the same error, Node: v15.2.1, Forever: v3.0.4, OS: Centos 7 |
As a workaround, I installed NVM and dialed back to node v12.20.0
|
and we dont want that |
@elias89 Same I moved to PM2 |
I'm facing the same issue. |
You can set the env var |
after so long, is there any solution for that? if i do forever list i see the forever process up and running, but i still can see the warning there. OS: Debian Bullseye forever list _ |
I've given up with forever, I have to update Node and this bug is an insurmountable problem. There are alternatives out there. |
use pm2 |
hai guys I'm facing the same issues Error: Cannot find module 'D:\GitHub\kidscare...' |
|
@polkila downgrading to 13 (for me) is not an option, I need at least v15 and latest version is 17 |
@rushglen Yep! Install 2 versions in parallel: |
You sure its issue from |
Having the same issue Ubuntu 18.04.4, node 14.18.1, forever 4.01 What I am using as a work around currently, is running forever is installed globally. |
I assume you're using nvm |
Took a stab at upgrading to the latest version of winston (which is currently 3.4.0) |
May someone check if new version https://www.npmjs.com/package/forever/v/4.0.3 has fixed the problem? At least it seems to let me run forever. |
It looks like a little more fixing will be needed. Specifically, flatiron/cliff#11 needs to get merged and then forever needs to depend on that new version of cliff. (Even after that there may be other instances of similar warnings lurking somewhere.) |
This warning came from winston 0.8.x: Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency See foreversd/forever#1077
We have:
I've taken a look and couldn't fix fast. All this inheritance looks like a dead end for me in using Forever :( |
Yes. Unfortunately, forever is deeply rooted in very outdated libraries. |
I'm not familiar with any of the libraries @2naive listed, except for just looking at them just now. But it looks like forever is only using flatiron for its CLI flag parsing, so it might be possible to switch forever to use |
@MatrixFrog I would prefer using |
I manually applied the changes described in that PR and so far, with my limited testing, I haven't seen any more warnings. If anyone wants to do the same, make sure to use the updated fix as mentioned in the thread. This doesn't help when using forever as a dependency in a project but my global install at least has clean logs again. |
I have just updated to forever v4.0.3 and still receive the padlevels error. Due to the error my process will not run. I can run it manually, so I know there is not an issue with the application. |
For what it's worth downgrading from node 14 to node 12 seems to make the problem go away. I'm also seeing the padLevels circular dependency error with the current release of forever (v4.0.3) and node v14[.16.0 in my case]. However I'm pretty sure the issue was not introduced in forever v4 because I had the same issue in forever v2.0.0. I only upgraded to v4 with the hope of making the problem go away. I think the root problem may have been introduced in some dependency of forever, but I have not tried to hunt to down which one. Specifically, here's what I'm seeing:
That is, I'm pretty sure what I've seen is (1) a fresh, from-scratch install of the app was working fine, (2) I updated several of my app's other dependencies (mostly express-related) by pinning to the latest version in package.json and re-running As mentioned above, downgrading from node 14 to node 12 seems to make the problem go away. That's good enough for me for now (for test/dev purposes at least) but assuming this issue isn't fixed in forever (or something upstream), personally it may be easier or better to finally migrate to pm2 rather than to try to hunt down the exact cause myself. I've been happy with forever since it has been working fine for me since, well, forever, so there's been no reason to change it but pm2 seems to be the conventional choice for this functionality for most node developers. EDIT: I just now noticed that this issue was reported not in May of this year but May of 2020. If this isn't a topic that the forever dev team is willing to address maybe they should just flag the module as deprecated/unsupported. I agree this doesn't look like a direct issue in forever, but it is an issue that you can recreate from |
|
Forever is correctly working within this warning |
Using node v18.18.2 and forever v4.0.3 I still have the error |
The new node version doesn't let process to start. whenever
is executed it shows the following warning
and after this if I check with
forever list
it shows no process is running.The text was updated successfully, but these errors were encountered: