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

Node.js 14 (node:15731) Warning: Accessing non-existent property of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) #910

Closed
JustFly1984 opened this issue Oct 24, 2020 · 1 comment
Labels
kind: support Asking for support with something or a specific use case problem: removed issue template OP removed the issue template without good cause scope: upstream Issue in upstream dependency solution: outdated This is not up-to-date with the current version

Comments

@JustFly1984
Copy link

Running the build command displays multiple warnings.

(node:15731) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:15731) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:15731) Warning: Accessing non-existent property 'which' of module exports inside circular dependency

my npm script looks like this:

{
"build": "npx tsdx build --name infoBox --format=cjs,esm,umd",
}

Environment - node 14.13.1
webpack 5.2.0

@agilgur5 agilgur5 added problem: removed issue template OP removed the issue template without good cause problem: no repro No reproduction was provided (and have not tried to repro without one) scope: upstream Issue in upstream dependency labels Oct 24, 2020
@agilgur5
Copy link
Collaborator

@JustFly1984 I'm not sure why you removed the issue template this time, but please don't do that, it's there for a reason

Environment - node 14.13.1
webpack 5.2.0

In particular, there's a specific command that is asked for all bug reports to use which gives all the required versions (TS, TSDX, etc). You used it in #900.

Webpack is also unrelated to TSDX so I'm not sure what you meant with that.

Running the build command displays multiple warnings.

This looks to be specific to Node 14, but not quite specific to TSDX. Similar to your #900 this seems to be a lockfile issue as this is coming from shelljs and should be fixed in the latest version of shelljs, which is not pinned by TSDX.

I did a search for this exact warning and the first result pointed to a Node issue, nodejs/node#32987. There is a mention of shelljs, which is what exports all those shell-sounding names, in a comment there: nodejs/node#32987 (comment) . That points to shelljs/shelljs#973 and says it should be solved by upgrading to shelljs v0.8.4.

It's pinned to v0.8.3 in your yarn.lock, so you can just change it there.

Please recognize that filing an issue is asking a volunteer to respond. Please try to debug and search whatever problem you're having before filing an issue as both this and #900 were problems upstream and are specific to your lockfile. If you do file an issue, please make sure to fill out the issue template, search existing issues for duplicates, and try to narrow down why this is an issue in TSDX specifically and not elsewhere. Other maintainers could close such issues outright for not providing this information as we don't have the resources / capacity to debug every users' issues

Internal Repro

This also affects internal tests. I looked through the CI logs and saw this happens on Node 14 tests as well because the internal yarn.lock (which does not affect TSDX users and is not published) also has shelljs v0.8.3 pinned.

@agilgur5 agilgur5 added solution: workaround available There is a workaround available for this issue and removed problem: no repro No reproduction was provided (and have not tried to repro without one) labels Oct 25, 2020
@agilgur5 agilgur5 added kind: support Asking for support with something or a specific use case solution: outdated This is not up-to-date with the current version and removed solution: workaround available There is a workaround available for this issue labels Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: support Asking for support with something or a specific use case problem: removed issue template OP removed the issue template without good cause scope: upstream Issue in upstream dependency solution: outdated This is not up-to-date with the current version
Projects
None yet
Development

No branches or pull requests

2 participants