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

Phantom dependencies #1660

Closed
stevebeauge opened this issue Sep 27, 2023 · 1 comment · Fixed by #1709
Closed

Phantom dependencies #1660

stevebeauge opened this issue Sep 27, 2023 · 1 comment · Fixed by #1709
Assignees
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@stevebeauge
Copy link
Contributor

stevebeauge commented Sep 27, 2023

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [ 3.16.0 ]

Expected / Desired Behavior / Question

A developer should be able to use any package manager to build the project. Especially pnpm or yarn which are way better than npm. This requires to be very rigorous in declaring dependencies.
Basically, any time a package is used in code, it should be present in the dependencies explicitly, and not by "chance", by indirect dependency.

Ideally, pnpm should be set as the default package manager for this project (personal thought). Even if npm remains the package manager, phantom dependencies introduces some risks.

Observed Behavior

When trying to switch to pnpm, the project cannot be built anymore because of some phantom dependencies. Phantom dependencies are explained greatly by the rush team (https://rushjs.io/pages/advanced/phantom_deps/).

Here's the list of phantom dependencies in this project:

  • @microsoft/sp-component-base@1.17.3
  • @microsoft/sp-http@1.17.3
  • @microsoft/sp-page-context@1.17.3
  • @microsoft/sp-extension-base@1.17.3
  • @uifabric/react-hooks@7.16.4
  • @pnp/odata@2.5.0
  • @uifabric/utilities@7.38.2
  • @pnp/common@2.5.0
  • @fluentui/merge-styles@8.5.12
  • @fluentui/styles@0.66.5
  • @fluentui/react-icons-northstar@0.66.5

Steps to Reproduce

  1. clone the repo
  2. run pnpm install (and not npm)
  3. try to build pnpm run build
  4. A lot of errors appear because of missing dependencies
@ghost
Copy link

ghost commented Sep 27, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 27, 2023
@michaelmaillot michaelmaillot added status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug and removed Needs: Triage 🔍 labels Oct 5, 2023
joelfmrodrigues added a commit that referenced this issue Oct 11, 2023
…encies

Fix package.json to remove phantom dependencies issues
@joelfmrodrigues joelfmrodrigues added this to the 3.16.0 milestone Oct 11, 2023
@joelfmrodrigues joelfmrodrigues added status:fixed-next-drop Issue will be fixed in upcoming release. and removed status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. labels Oct 11, 2023
@AJIXuMuK AJIXuMuK mentioned this issue Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants