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

(node:3271) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency #34780

Closed
ngdangtu-vn opened this issue Aug 14, 2020 · 3 comments

Comments

@ngdangtu-vn
Copy link

  • Version: v14.8.0
  • Platform: Linux 5.4.51-v7l+ armv7l GNU/Linux
  • Subsystem: Don't know

What steps will reproduce the bug?

npm i -g surge
surge

How often does it reproduce? Is there a required condition?

It happens constantly.

What is the expected behavior?

In the surge document, it shouldn't have any warning.

What do you see instead?

(node:3271) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

Additional information

I couldn't set flag for node because I run surge directly. So I don't know what modules really cause this.

@addaleax
Copy link
Member

I couldn't set flag for node because I run surge directly. So I don't know what modules really cause this.

Fwiw, here’s a trick for that: you can run node $(which surge) instead of surge, to enable passing flags to Node.js.

@ngdangtu-vn
Copy link
Author

ngdangtu-vn commented Aug 14, 2020

@addaleax
You have no idea how appreaciate I am. Thank you very much. I'll dig deeper to the problem.

Update 15/Aug

(node:4854) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Object.exports.setLevels (/usr/lib/node_modules/surge/node_modules/winston/lib/winston/common.js:32:14)
    at Object.<anonymous> (/usr/lib/node_modules/surge/node_modules/winston/lib/winston.js:83:8)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
    at require (internal/modules/cjs/helpers.js:75:18)

This loop seems like a result of surge using a deprecated method from winston package. Maybe this is not actually problem of NodeJs.

@ngdangtu-vn
Copy link
Author

Just found an issue surge#403. I guess this is not the problem of NodeJs 14, but it is more like a new implement.

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