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

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

@asudoh

Description

@asudoh

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: [email protected]
npm ERR! Found: [email protected]
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 [email protected]
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 [email protected] [email protected]

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)

Metadata

Metadata

Assignees

Labels

Airtable DoneCorresponding record created in AirtabledevNeeds some dev workdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions