question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SFDX throwing many `(node:22792) Warning: Accessing non-existent property '<prop>' of module exports inside circular dependency`

See original GitHub issue

Summary

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:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:9

github_iconTop GitHub Comments

9reactions
troveryorcommented, Mar 1, 2021

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.

3reactions
JodieMcommented, Mar 10, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessing non-existent property 'count' of module exports ...
Warning : Accessing non-existent property 'count' of module exports inside circular dependency ... Welcome to Node.js v14.0.0. Type “.help” for ...
Read more >
(node:15867) Warning: Accessing non-existent property 'cat ...
(node:15900) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency (Use `node --trace-warnings .
Read more >
API with NestJS #61. Dealing with circular dependencies
We go through the concept of circular dependencies in the context of ... Warning: Accessing non-existent property 'one' of module exports ...
Read more >
The Curious Case of Circular Dependencies in Node - Medium
Consider the scenario of a simple registration module with two dependent services: one (let's call it the Document Service) has a generic ...
Read more >
Accessing non-existent property 'padLevels' of module exports ...
prompt: password: (node:93) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found