code-dependency icon indicating copy to clipboard operation
code-dependency copied to clipboard

Error: Cannot find module 'core-js'

Open lenntt opened this issue 4 years ago • 0 comments

Describe the bug I ran via the instructions to analyze a react app, which failed with the error: "Error: Cannot find module 'core-js'"

To Reproduce Steps to reproduce the behavior:

  1. yarn global add @code-dependency/[email protected]
  2. `code-dependency --source src
  3. fails with an error (see stack below)

Expected behavior No error

Environment node 14.18.0 macos

Additional context I didn't dig into the details, but globally installing core-js did it for me. Perhaps it should be a peer dependency?

Stack:

Error: Cannot find module 'core-js'
Require stack:
- /Users/<>/.config/yarn/global/node_modules/@code-dependency/view/lib/application.lib.js
- /Users/<>/.config/yarn/global/node_modules/@code-dependency/cli/dist/index.js
- /Users/<>/.config/yarn/global/node_modules/@code-dependency/cli/bin/code-dependency.js

lenntt avatar Dec 28 '21 09:12 lenntt