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

Error: Cannot find module 'ajv/dist/core' #2452

Closed
alexandrebodin opened this issue Jun 14, 2024 · 3 comments
Closed

Error: Cannot find module 'ajv/dist/core' #2452

alexandrebodin opened this issue Jun 14, 2024 · 3 comments

Comments

@alexandrebodin
Copy link

Our app started to fail when dependencies are installed by npm (works with yarn & pnpm)

Error: Cannot find module 'ajv/dist/core'
Require stack:
Require stack:
- /project/node_modules/ajv-draft-04/dist/index.js
- /project/node_modules/@rushstack/node-core-library/lib/JsonSchema.js
- /project/node_modules/@rushstack/node-core-library/lib/index.js
- /project/node_modules/@rushstack/terminal/lib/NormalizeNewlinesTextRewriter.js
- /project/node_modules/@rushstack/terminal/lib/index.js
- /project/node_modules/@rushstack/ts-command-line/lib/providers/CommandLineParser.js
- /project/node_modules/@rushstack/ts-command-line/lib/providers/ScopedCommandLineAction.js
- /project/node_modules/@rushstack/ts-command-line/lib/index.js
- /project/node_modules/umzug/lib/cli.js
- /project/node_modules/umzug/lib/umzug.js
- /project/node_modules/umzug/lib/index.js

I tried installing the dependencies with --force & --legacy-peer-deps with no success.

  ├─┬ project
  │ └─┬ [email protected]
  │   └─┬ @rushstack/[email protected]
  │     └─┬ @rushstack/[email protected]
  │       └─┬ @rushstack/[email protected]
  │         ├─┬ [email protected]
  │         │ └── [email protected] deduped invalid: "^8.5.0" from node_modules/ajv-draft-04
  │         ├─┬ [email protected]
  │         │ └── [email protected]
  │         └── [email protected]
 

it seems that ajv-draft-04 has an invalid peer dep config (or npm doesn't know what to do with it ?) that resolves to and old version of ajv instead of the right one.

Let me know if I can provide more information :)

@jasoniangreen
Copy link
Collaborator

Hmm, if it works with yarn and pnpm maybe you should try posting on npm issues. We haven't made any changes recently that touched peer dependencies or ajv-draft-04.

@alexandrebodin
Copy link
Author

Will investigate ty

@reslear
Copy link

reslear commented Jul 3, 2024

same fixed for v4 is install npm i ajv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants