peer-dependencies

Forcing npm install failures on mismatched peerDependencies

只愿长相守 提交于 2021-02-17 02:50:08
问题 Does anyone have a technique for getting npm install to completely fail when peerDependency version mismatches are present? We frequently hit issues where peerDependency warnings go unheeded by developers, and semver mismatches cause breakage when insufficient testing is present. It would be nice if our CICD processes could bomb out due to error exit codes when attempting an install with unresolved version conflicts. 回答1: You can't (as far as I'm aware) do this during npm install , but you

Missing peer dependencies

心已入冬 提交于 2020-12-28 12:24:05
问题 I am new to npm and angular projects, and I am using bootstrap@4.1.1 in my package.json . When I do npm install, I get the following error - bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself. Does this mean that I need to add jquery@1.9.1 - 3 to my package.json under peerDependencies section, apart from installing it locally with no-save option? Also, do we need to install this missing peer dependency on the build server as

Missing peer dependencies

北城以北 提交于 2020-12-28 12:19:35
问题 I am new to npm and angular projects, and I am using bootstrap@4.1.1 in my package.json . When I do npm install, I get the following error - bootstrap@4.1.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself. Does this mean that I need to add jquery@1.9.1 - 3 to my package.json under peerDependencies section, apart from installing it locally with no-save option? Also, do we need to install this missing peer dependency on the build server as

How to test an npm module with peerDependencies?

假如想象 提交于 2020-06-27 07:31:40
问题 I am new to understand peerDependencies , and I have read the following references seeking as to how to test an npm module contains peerDependencies within its package.json: Peer Dependencies Understanding the npm dependency model Common npm mistakes StackOverflow: npm peerDependencies during development However, I have not found a clear solution for testing npm with peerDependencies. Some recommend adding the peerDependencies as globals, and some reference to include peerDependencies within

Using Peer Dependencies With Local (file:../some-lib) Dependencies

独自空忆成欢 提交于 2020-06-12 06:49:12
问题 I have a monorepo that has many micro-services in it. There are some library-type functions / classes that I want to make available to any micro-service that needs it. However, if that library package declares a peer dependency, the peer dependency is not found when running code from within the thing that depends on the library. Consider this repo structure: lib some-library (peerDepends on foo ) index.js (requires foo ) node_modules will be empty services some-service (depends on foo , and