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

Warning is output with Node.js 14 #403

Closed
fu-sen opened this issue Apr 23, 2020 · 12 comments
Closed

Warning is output with Node.js 14 #403

fu-sen opened this issue Apr 23, 2020 · 12 comments

Comments

@fu-sen
Copy link

fu-sen commented Apr 23, 2020

I updated to the new version of Node.js 14.0.0, which was recently published.
Then surge will always return the following output:

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

Of these, 8280 is random. the operation of surge CLI itself works.

@sintaxi
Copy link
Owner

sintaxi commented Apr 23, 2020

Thanks for reporting. We'll look into it!

@fu-sen
Copy link
Author

fu-sen commented Apr 30, 2020

Node.js has been updated to 14.1.0. This issue continues.
(I use Windows 10 PowerShell)

> surge --version

   v0.21.3

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

@jfarmer
Copy link

jfarmer commented Jun 7, 2020

For anyone reading this, the underlying issue is with the https://github.com/winstonjs/winston logging library. See winstonjs/winston#1797

The message is the result of new error logging added in Node 14 (nodejs/node#29935).

@sintaxi
Copy link
Owner

sintaxi commented Jun 7, 2020

@jfarmer thank you for the info. It helps a lot.

@syabro
Copy link

syabro commented Nov 9, 2020

@sintaxi whinston fix winstonjs/winston#1800 was merged a while ago
Could you update deps?

@syabro
Copy link

syabro commented Nov 9, 2020

Hmm, looks like prompt is not maintained anymore.
I think the best solution here is to switch to https://www.npmjs.com/package/prompts or https://www.npmjs.com/package/enquirer

@sintaxi
Copy link
Owner

sintaxi commented Nov 9, 2020

@syabro thanks. What do you suppose is the easiest solution for taking care of the warning?

@syabro
Copy link

syabro commented Nov 9, 2020

@sintaxi actually AFAIS prompt is being imported only

var prompt = require('prompt')

But moreover it's not being used.
So I think you can just remove it.

@syabro
Copy link

syabro commented Nov 9, 2020

Also I would strongly recommend to add eslint with https://eslint.org/docs/rules/no-unused-vars

@sintaxi
Copy link
Owner

sintaxi commented Nov 10, 2020

Thanks for doing the heavy lifting @syabro.

I just released [email protected] which removes prompt which should resolve these CLI issues on [email protected].

@sintaxi sintaxi closed this as completed Nov 10, 2020
@fu-sen
Copy link
Author

fu-sen commented Nov 10, 2020

I ran npm i -g surge and saw this improvement. Thank you for the improvement! 😄

@sintaxi
Copy link
Owner

sintaxi commented Nov 10, 2020

@fu-sen you're welcome!

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

4 participants