SFDX throwing many `(node:22792) Warning: Accessing non-existent property '<prop>' of module exports inside circular dependency`
See original GitHub issueSummary
All SFDX commands are now throwing strange node errors on every invocation. I have uninstalled all custom plugins and still seeing the same behavior. Seems to have been in the most recent update. Looking at the internet suggests this is a new warning thrown by Node 14.
Steps To Reproduce:
Ensure you are on the latest SFDX, run sfdx --version
(node:31052) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:31052) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:31052) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
sfdx-cli/7.88.4-3b2e55c3f1 win32-x64 node-v14.15.4
If I enabled the trace-warnings then each of those lines is expanded to the:
(node:45392) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
at Object.get (internal/modules/cjs/loader.js:664:5)
at Object._register [as register] (C:\Users\<user>\AppData\Local\sfdx\node_modules\shelljs\src\common.js:453:12)
at Object.<anonymous> (C:\Users\<user>\AppData\Local\sfdx\node_modules\shelljs\src\which.js:5:8)
at Module._compile (C:\Users\<user>\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (C:\Users\<user>\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
I realize this is an upstream dependency but thought it should still be logged here.
Expected result
Only display the version
Actual result
Lots of warning messages displayed and clogging up my output.
Additional information
Feel free to attach a screenshot.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.88.4-3b2e55c3f1 win32-x64 node-v14.15.4
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.10.0
├─ @oclif/plugin-help 2.2.2
└─ @oclif/plugin-update 1.3.9
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
auth 1.4.8 (core)
config 1.2.4 (core)
generator 1.1.5 (core)
salesforcedx 51.0.4 (core)
├─ limits 1.0.4 (core)
├─ schema 1.0.4 (core)
├─ user 1.1.2 (core)
├─ custom-metadata 1.0.11 (core)
├─ apex 0.1.4 (core)
├─ templates 51.2.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ salesforce-alm 51.0.2 (core)
sfdx-cli 7.88.4 (core)
telemetry 1.1.1 (core)
OS and version: Windows 10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9
Just a note on Node versions.
I’m on Node.js v12.17.0 and was seeing the same Node warnings from sfdx commands. The dev server uninstall cmd :
sfdx plugins:uninstall @salesforce/lwc-dev-server
has resolved the warning message deluge however.I have the same issue. I did not know that I had lwc-dev-server as it is not in my extensions list but I ran the command anyway (I have no idea what I’m doing with Node) and it removed the issue. I have no idea if I need this plugin or what it is going to do by not having it.