AndiDittrich / NodeMCU-Tool

:wrench: Upload + Manage Lua files on NodeMCU
https://www.npmjs.com/package/nodemcu-tool
MIT License
310 stars 54 forks source link

Annoying warning for every command with nodemcu-tool #74

Closed buzzy closed 4 years ago

buzzy commented 4 years ago

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

AndiDittrich commented 4 years ago

Hi @buzzy

with node 12LTS i'm unable to reproduce this issue.

can you please provide more informations about your platform/versions etc ?

AndiDittrich commented 4 years ago

it seems to be a general issue with nodejs 14 - please use the lts version

buzzy commented 4 years ago

Well, more than me will have the issue. I installed node with "brew install node", like most people will on Mac. Anyways, thanks for the quick response!

jamsinclair commented 2 years ago

The error was:

(node:1793) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    at emitCircularRequireWarning (node:internal/modules/cjs/loader:707:11)
    at Object.get (node:internal/modules/cjs/loader:721:5)
    at Object.exports.setLevels (/Users/person/workspace/NodeMCU-Tool/node_modules/winston/lib/winston/common.js:32:14)
    at Object.<anonymous> (/Users/person/workspace/NodeMCU-Tool/node_modules/winston/lib/winston.js:83:8)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)

This was caused by an old version of winston in use in the prompt dependency.

Upgrading the project's prompt dependency to latest version seems to resolve this.