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

[Bug] Accessing non-existent property ____ of module exports inside circular dependency #652

Closed
justekoro opened this issue Oct 30, 2020 · 2 comments

Comments

@justekoro
Copy link

Type of issue

Bug


My environment

  • OS version/details: Windows 10 64-bit
  • Node version: 14.4.0 (run node --version in your terminal)
  • npm version: 6.14.5 (run npm --version in your terminal)
  • Version of yo : 3.1.1 (run yo --version in your terminal)

Expected behavior

I'm following this tutorial and it should've given me just "Method one" and "Method two" in the console.

Current behavior

Before logging Method one and Method two, I got some non excepted errors.

Steps to reproduce the behavior

generator/app/index.js:

const Generator = require('yeoman-generator');

module.exports = class extends Generator {
    constructor(args, opts) {
        super(args, opts);

        this.option('babel');
    }

    method1(){
        this.log("Method 1")
    }

    method2(){
        this.log("Method 2")
    }
}

package.json:

{
  "name": "generator-koro",
  "version": "0.1.0",
  "description": "",
  "files": [
    "generators"
  ],
  "keywords": [
    "yeoman-generator"
  ],
  "dependencies": {
    "yeoman-generator": "^1.0.0"
  }
}

then yo koro

Command line output

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

This is similar to this issue

@ddurschlag
Copy link

This is caused by an old version of shelljs. See shelljs/shelljs#991 for more. Version 0.8.4 (latest) should fix the issue.

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

2 participants