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

Installing plugins leads to error messages that we indicate the user should feel free to ignore #99

Closed
ghost opened this issue Nov 1, 2018 · 4 comments
Labels
enhancement New feature or request plugins This issue involves the Plugin Facility
Milestone

Comments

@ghost
Copy link

ghost commented Nov 1, 2018

When installing plugins, users are subjected to the following messages.

npm WARN enoent ENOENT: no such file or directory, open '/home/zowe/.zowe/plugins/installed/lib/package.json'
npm WARN @brightside/db2@1.0.0-next.201810041114 requires a peer of @brightside/core@1.x but none is installed. You must install peer dependencies yourself.
npm WARN @brightside/db2@1.0.0-next.201810041114 requires a peer of @brightside/imperative@1.x but none is installed. You must install peer dependencies yourself.

With issue #33 fixed, the peer dependency warnings should be removed since they are injected by the module loader.

To address these 2 warnings:

  • We need to change the Plugin Management Facility logic to not look at peer dependencies to verify compatibility, we should change it to look at the devDependency.
  • Leave the check to peerDependencies as a deprecated fallback so that plugins have some time to adjust. We should remove support for peerDependencies before the next major version of Imperative.

For the no such file or directory warning, this was added in #75. We should look into how we can suppress this error and what is different between doing npm i -g --prefix "some-location" some-package and how we are calling the api. It would seem like we are doing something slightly different than the npm command itself.

@ghost ghost added enhancement New feature or request plugins This issue involves the Plugin Facility labels Nov 1, 2018
@ChrisBoehmCA ChrisBoehmCA added this to the Developer milestone Feb 13, 2019
@BrandonJenkins14
Copy link
Contributor

BrandonJenkins14 commented Feb 13, 2019

General note - I agree that the latter 2 warnings should be removed because people assume that some action is required on their part. I know that we have a message that usually says "ignore the peer dependency warnings", but I don't see that disclaimer when issuing a 'bright plugins update' command.

Users get confused -
https://openmainframeproject.slack.com/archives/CC08782AG/p1550163576037900

@zFernand0
Copy link
Member

hey @awharn and @t1m0thyj, will this be a problem in npm 7?

@t1m0thyj
Copy link
Member

t1m0thyj commented Aug 20, 2021

I think that it won't be a problem anymore, since npm@7 has different behavior for installing peer dependencies. It automatically installs them if missing, rather than warning that they are not installed. Although we disable the behavior of automatically installing them, the warnings are still missing.

That being said, there are still similar warnings that we produce ourselves. For example, when I try installing an @next plugin into @zowe-v1-lts CLI in an environment with npm@7:

$ zowe plugins install @zowe/cics-for-zowe-cli@next
Plug-ins within the Imperative CLI Framework can legitimately gain
control of the zowe CLI application during the execution of every command.
Install 3rd party plug-ins at your own risk.

Imperative's plugin installation program handles @zowe peer dependencies.
You can safely ignore NPM warnings about missing @zowe peer dependencies.

Registry = https://registry.npmjs.org/

_______________________________________________________________
Installed plugin name = '@zowe/cics-for-zowe-cli'

_____ Validation results for plugin '@zowe/cics-for-zowe-cli' _____

*** Warning: The property '@zowe/cli' does not exist within the 'peerDependencies' property in the file 'C:\Users\User\.zowe\plugins\installed\node_modules\@zowe\cics-for-zowe-cli\package.json'.

*** Warning: The version value (>=5.0.0-next.202106221817 <5.0.0) of the plugin's '@zowe/imperative' property is incompatible with the version value (4.13.4) of the zowe command's '@zowe/imperative' property.

This plugin has warnings, but its commands and framework overrides will still be available.

@t1m0thyj
Copy link
Member

Closing since npm@7 and newer no longer emits these warnings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request plugins This issue involves the Plugin Facility
Projects
None yet
Development

No branches or pull requests

4 participants