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

Unable to resolve dependency tree when installing @salesforce/sfdx-lwc-jest #3056

Closed
metalshark opened this issue Oct 12, 2024 · 3 comments
Closed
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@metalshark
Copy link

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Unable to resolve dependency tree when installing installing @salesforce/sfdx-lwc-jest on Windows 11 using cli version 2.61.8-ec7097b.

Steps To Reproduce

Create a new standard project on Windows 11 using sf cli version 2.61.8-ec7097b
Run the command sf force lightning lwc test setup

Expected result

Jest is added to the project

Actual result

Installing @salesforce/sfdx-lwc-jest node package...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/eslint
npm error   dev eslint@"^9.9.1" from the root project
npm error   peer eslint@"^7.5.0 || ^8.0.0 || ^9.0.0" from @babel/[email protected]
npm error   node_modules/@babel/eslint-parser
npm error     peer @babel/eslint-parser@"^7" from @lwc/[email protected]
npm error     node_modules/@lwc/eslint-plugin-lwc
npm error       dev @lwc/eslint-plugin-lwc@"^1.1.2" from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint@"^7 || ^8" from @lwc/[email protected]
npm error node_modules/@lwc/eslint-plugin-lwc
npm error   dev @lwc/eslint-plugin-lwc@"^1.1.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error npm-cache\_logs\2024-10-12T11_33_32_828Z-eresolve-report.txt
npm error A complete log of this run can be found in: npm-cache\_logs\2024-10-12T11_33_32_828Z-debug-0.log
ERROR running force:lightning:lwc:test:setup:  Error installing @salesforce/sfdx-lwc-jest: 'Command failed: npm install --save-dev @salesforce/sfdx-lwc-jest'

System Information

Using Powershell

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.61.8",
  "nodeVersion": "node-v20.17.0",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "sf\\client\\2.61.8-ec7097b",
  "shell": "powershell",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.5 (core)",
    "@oclif/plugin-commands 4.0.16 (core)",
    "@oclif/plugin-help 6.2.13 (core)",
    "@oclif/plugin-not-found 3.2.22 (core)",
    "@oclif/plugin-plugins 5.4.10 (core)",
    "@oclif/plugin-search 1.2.10 (core)",
    "@oclif/plugin-update 4.5.10 (core)",
    "@oclif/plugin-version 2.2.14 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.18 (core)",
    "@oclif/plugin-which 3.2.15 (core)",
    "@salesforce/cli 2.61.8 (core)",
    "@salesforce/lwc-dev-mobile 2.3.0 (user) published 351 days ago (Thu Oct 26 2023)",
    "apex 3.5.0 (core)",
    "api 1.2.2 (core)",
    "auth 3.6.65 (core)",
    "data 3.6.8 (core)",
    "deploy-retrieve 3.12.15 (core)",
    "info 3.4.9 (core)",
    "limits 3.3.32 (core)",
    "marketplace 1.2.26 (core)",
    "org 4.6.0 (core)",
    "packaging 2.8.10 (core)",
    "schema 3.3.34 (core)",
    "settings 2.3.23 (core)",
    "sobject 1.4.40 (core)",
    "source 3.5.21 (core)",
    "telemetry 3.6.15 (core)",
    "templates 56.3.21 (core)",
    "trust 3.7.32 (core)",
    "user 3.5.32 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.2.0 (user) published 220 days ago (Tue Mar 05 2024) (latest is 1.2.1)"
  ]
}
@metalshark metalshark added the investigating We're actively investigating this issue label Oct 12, 2024
@github-actions github-actions bot added the validated Version information for this issue has been validated label Oct 12, 2024
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@metalshark
Copy link
Author

I've changed the default package.json to use eslint ^8.57.0 like eslint-plugin-lwc does for now and it's working.

@mdonnalley
Copy link
Contributor

There's an open issue for this: salesforce/eslint-config-lwc#128

@mdonnalley mdonnalley closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants