Skip to content

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

@enjoy-myLife

Description

@enjoy-myLife

Type of issue

yo initialization command error


My environment

  • OS version/details: Windows 10 64-bit
  • Node version: 20.16.0
  • npm version: 10.8.1
  • Version of yo : 5.0.0

Expected behavior

The yo webapp command can be used normally

Step1: npm i yo generator-webapp -g
Step2: yo webapp
Then it reported an error

Current behavior

微信截图_20241029203324
o webapp

Steps to reproduce the behavior

Step1: npm i yo generator-webapp -g
Step2: yo webapp

Command line output

(base) PS E:\personal\cli> pnpm i yo generator-webapp -g
 ERR_PNPM_NO_GLOBAL_BIN_DIR  Unable to find the global bin directory
Run "pnpm setup" to create it automatically, or set the global-bin-dir setting, or the PNPM_HOME env variable. The global bin directory should be in the PATH.
(base) PS E:\personal\cli> ^C
(base) PS E:\personal\cli> ^C
(base) PS E:\personal\cli> ^C
(base) PS E:\personal\cli> ^C
(base) PS E:\personal\cli> ^C
(base) PS E:\personal\cli> npm i yo generator-webapp -g
npm warn deprecated npmlog@2.0.4: This package is no longer supported.
npm warn deprecated gauge@1.2.7: This package is no longer supported.
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated boolean@3.2.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported

added 1316 packages in 32s

148 packages are looking for funding
  run `npm fund` for details
(base) PS E:\personal\cli> yo webapp
(node:17660) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:17660) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:17660) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Error webapp 

generator.run is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions