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

Yarn flat dependency #11

Closed
TheLandolorien opened this issue Jan 22, 2018 · 1 comment
Closed

Yarn flat dependency #11

TheLandolorien opened this issue Jan 22, 2018 · 1 comment

Comments

@TheLandolorien
Copy link

TheLandolorien commented Jan 22, 2018

Submit an Issue

Yarn flat dependency

Expected behavior and actual behavior:

For those migrating away from bower, it is necessary to use Yarn. However, the "flat": true dependency added to the package.json config back in May makes full yarn installs nearly impossible.

It seems odd that px-colors-design requires a flat dependency and is the only one of the PredixDev codelines to do so.

Commit fca0322 indicates that this is an Experiment force flat for yarn. Is the flat dependency really required?

Rolling back to v1.0.1-prerelease-6 before the flat dependency solves the issue.

Steps to reproduce the problem:

  1. Install Yarn.
  2. Perform any bower install that also installs px-colors-design (Using the predix-webapp-starter works for this).
  3. Follow the steps to install bower-away.
  4. Run bower-away until the yarn step and notice that yarn cannot install dependencies due to the px-colors-design flat dependencies requires (May have to do yarn --verbose to see that px-colors-design is the package causing the issue).

Environment (component version number, Browser (including version), operating system, hardware, etc):

Key Value
component px-colors-design (v1.0.2)
OS macOS Sierra (version 10.12.6)
Browser N/A

Screenshots (optional, but very helpful):

bower-away Steps

image

Install Error

image

@davidrleonard
Copy link
Collaborator

This is an ecosystem-wide problem that there's no easy fix for. We're following the best approach that's available to us right now by enforcing flat dependencies in projects that use px-colors-design. This ensures upstream projects have one and only one version of px-colors-design installed, so px-colors-design/colors-shared-styles.html can be loaded safely without global namespace conflicts or incorrect paths.

We're waiting on discussions over in Polymer/polymer#4823 and package-community/discussions#2, and wider discussions about how to handle dependency management in projects using package.json for front and back-end dependencies, to shake out before we change our approach. We're going to stick with this for now.

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

No branches or pull requests

2 participants