Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Replace -S with -P in npm install instruction #634

Closed
asudoh opened this issue May 7, 2021 · 0 comments
Closed

Replace -S with -P in npm install instruction #634

asudoh opened this issue May 7, 2021 · 0 comments
Assignees
Labels
Airtable Done Corresponding record created in Airtable dev Needs some dev work documentation Improvements or additions to documentation
Milestone

Comments

@asudoh
Copy link
Collaborator

asudoh commented May 7, 2021

When I follow the instructions in the top-level README file to install the component library:

npm install -S carbon-web-components carbon-components

I find that it leads to a peer dependency conflict:

✗ npm install --save carbon-web-components carbon-components
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ft-widget@1.0.0
npm ERR! Found: carbon-components@10.34.0
npm ERR! node_modules/carbon-components
npm ERR!   carbon-components@"^10.34.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer carbon-components@"~10.32.0" from carbon-web-components@1.13.1
npm ERR! node_modules/carbon-web-components
npm ERR!   carbon-web-components@"*" from the root project

Looking at the change history of the project's package.json file, I see that the version of carbon-components library dependency is locked down (using the tilde version specifier) and is periodically bumped up. Presumably somebody is carefully testing that the carbon-web-components library is in fact compatible with the newer version of the carbon-components library. But is it truly necessary to lock down versions that tightly? If it is, people should be told to specify the versions explicitly in the npm install comand:

npm install --save carbon-components@10.32.0 carbon-web-components@1.13.1

That works, but specifying versions in this way is not something that I can recall seeing before. It seems like something outside of best practices.

Also: The use of the "-S" option in the README's npm command example no longer works. Would be good to change:

npm install -S carbon-web-components carbon-components lit-html lit-element

to:

npm install --save carbon-web-components carbon-components lit-html lit-element

Originally posted by @TrentBrown in #557 (comment)

jeffchew added a commit to jeffchew/carbon-web-components that referenced this issue May 11, 2021
kodiakhq bot added a commit that referenced this issue May 11, 2021
Addresses #634

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@jeffchew jeffchew self-assigned this May 14, 2021
@jeffchew jeffchew added dev Needs some dev work documentation Improvements or additions to documentation labels May 14, 2021
@jeffchew jeffchew added this to the Sprint 21-10 milestone May 14, 2021
@RobertaJHahn RobertaJHahn added the Airtable Done Corresponding record created in Airtable label May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Airtable Done Corresponding record created in Airtable dev Needs some dev work documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants