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

Warning: Accessing non-existent property 'cat' of module exports inside circular dependency #2945

Closed
pschoffer opened this issue Mar 31, 2021 · 2 comments
Labels
bug Something aint working right!

Comments

@pschoffer
Copy link

pschoffer commented Mar 31, 2021

tl;dr: Could you bump your shelljs dependency for the next release please?

Tell us about your setup

Lando v.3.0.26

Node.js v14.16.0

Tell us about your .lando.yml

Not relevant probably

Tell us about the command you were running

We are using lando as a library and trying to use it in our CLI directly. Our code is:

	const lando = new Lando( getLandoConfig() );
	await lando.bootstrap();

	const app = lando.getApp( instancePath );
	await app.init();

	await app.start();

Tell us about the error you got

node:233426) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:233426) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:233426) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:233426) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
...

If I trace warnings:

$ node --trace-warnings script.js
(node:238101) Warning: Accessing non-existent property 'cat' 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] (/home/pavel/git/automattic/vip/node_modules/shelljs/src/common.js:455:12)
    at Object.<anonymous> (/home/pavel/git/automattic/vip/node_modules/shelljs/src/cat.js:4:8)
    at Module._compile (internal/modules/cjs/loader.js:1063: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 (internal/modules/cjs/helpers.js:88:18)
....

Tell us more

So it seems the warning is coming from shelljs. It seems the folks there already fixed it.

Could you bump your shelljs dependency for the next release, please?

@pschoffer pschoffer added the bug Something aint working right! label Mar 31, 2021
@pirog
Copy link
Sponsor Member

pirog commented Apr 5, 2021

@pschoffer please see #2928

@pschoffer
Copy link
Author

Oh alright! Thanks for the link @pirog !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something aint working right!
Projects
None yet
Development

No branches or pull requests

2 participants