Skip to content

Failing due to Winston dependency in Node 14 #199

Open

Description

@patrick-rodgers

In Node 14 application seeing an error:

Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency

I traced this error back to the winston package used within prompt.

I think this is related to this Pull Request in the node engine.

If there is interest in merging a fix I can submit a PR to try and address, but this package no longer appears maintained. Any feedback available on next steps as I believe prompt to be broken in node 14.

Activity

  1. martinlevesque commented on May 15, 2020

    @martinlevesque

    The package really causes this warning.

    Made a simple POC.

    package.json:

    {
      "name": "prompt-test",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "author": "",
      "license": "ISC",
      "dependencies": {
        "prompt": "^1.0.0"
      }
    }
    
    

    server.js:

    require('prompt')

    leads to:

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

  2. kohenkatz commented on Oct 30, 2020

    @kohenkatz

    Winston version 2.4.5 fixes this issue (see winstonjs/winston#1797 (comment)). The package.json here says "winston": "2.x" on master, but that was committed on 2016-12-15 while the last version tag (v1.0.0) is from long before that. Tagging a new version based on the current master should fix this problem.

  3. apolopena commented on Nov 6, 2020

    @apolopena

    If a maintainer of this module that has the capability to publish to the npm registry ever expresses interest in some basic fixes, I would be happy to submit a PR to fix this issue. Until then I just use a forked version of this repo because I love it so much.

  4. ezze commented on Nov 26, 2020

    @ezze

    Guys, please update winston up to 2.4.5!

  5. ezze commented on Nov 26, 2020

    @ezze

    @gangstead I see you accept pull requests for the repo. Could you please publish 1.1.0 to npm? It was fixed few years ago in master: 6ebf54a

  6. Gnosnay commented on Mar 9, 2021

    @Gnosnay

    @gangstead I see you accept pull requests for the repo. Could you please publish 1.1.0 to npm? It was fixed few years ago in master: 6ebf54a

    actually I am not sure whether prompt 1.1.0 fix this problem. cause I do update the prompt version to 1.1.0, but it still install the 2.1.x winston dep

  7. caub commented on Mar 9, 2021

    @caub
    Contributor

    @Yansongsongsong Can you double check, because 1.1.0 is published and is the same as https://github.com/flatiron/prompt/blob/master/package.json#L25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions