Closed fu-sen closed 3 years ago
Thanks for reporting. We'll look into it!
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)
For anyone reading this, the underlying issue is with the https://github.com/winstonjs/winston logging library. See https://github.com/winstonjs/winston/issues/1797
The message is the result of new error logging added in Node 14 (https://github.com/nodejs/node/pull/29935).
@jfarmer thank you for the info. It helps a lot.
@sintaxi whinston fix https://github.com/winstonjs/winston/pull/1800 was merged a while ago Could you update deps?
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
@syabro thanks. What do you suppose is the easiest solution for taking care of the warning?
@sintaxi actually AFAIS prompt is being imported only https://github.com/sintaxi/surge/blob/86f3b43091609e80564e8998a6718196370ca1fd/lib/middleware/util/helpers.js#L1 But moreover it's not being used. So I think you can just remove it.
Also I would strongly recommend to add eslint
with https://eslint.org/docs/rules/no-unused-vars
Thanks for doing the heavy lifting @syabro.
I just released surge@0.21.7
which removes prompt which should resolve these CLI issues on node@14.x
.
I ran npm i -g surge
and saw this improvement. Thank you for the improvement! 😄
@fu-sen you're welcome!
I updated to the new version of Node.js 14.0.0, which was recently published. Then
surge
will always return the following output:Of these,
8280
is random. the operation of surge CLI itself works.