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

Failing due to Winston dependency in Node 14 #199

Open
patrick-rodgers opened this issue Apr 23, 2020 · 7 comments
Open

Failing due to Winston dependency in Node 14 #199

patrick-rodgers opened this issue Apr 23, 2020 · 7 comments

Comments

@patrick-rodgers
Copy link

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.

@martinlevesque
Copy link

martinlevesque commented May 15, 2020

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)

36degrees added a commit to alphagov/govuk-prototype-kit that referenced this issue May 26, 2020
Prompt's dependency winston is causing a warning in the console:

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

This has been raised as an issue on prompt's GitHub repo [1] but given the last release of prompt was 4 years ago, I think it makes sense to move away to an alternative that's actively maintained.

[1]: flatiron/prompt#199
36degrees added a commit to alphagov/govuk-prototype-kit that referenced this issue May 26, 2020
Prompt's dependency winston is causing a warning in the console:

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

This has been raised as an issue on prompt's GitHub repo [1] but given the last release of prompt was 4 years ago, I think it makes sense to move away to an alternative that's actively maintained.

[1]: flatiron/prompt#199
@kohenkatz
Copy link

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.

@apolopena
Copy link

apolopena commented Nov 6, 2020

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.

@ezze
Copy link

ezze commented Nov 26, 2020

Guys, please update winston up to 2.4.5!

@ezze
Copy link

ezze commented Nov 26, 2020

@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

@Gnosnay
Copy link

Gnosnay commented Mar 9, 2021

@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

@caub
Copy link
Contributor

caub commented Mar 9, 2021

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants