- 
                Notifications
    You must be signed in to change notification settings 
- Fork 14
Description
We use the nvm software, node.js version manager, to be able to quickly switch from one version of node.js to another.
This is a need of our organization.
With nvm, each version of node.js/npm is installed in a different folder, with a subfolder containing the npm modules.
@zowe/cli is an npm module, and therefore when activating a node.js/npm version for the first time, the @zowe/cli module must be reinstalled.
The installation of @zowe/cli detects previous installation of zowe plugins which are installed outside of the npm modules subfolder.
We noticed, during a version switch of node.js to an earlier version, that the plugin @zowe/db2-for-zowe-cli was dependent on the npm version used when it was installed:
>nvm list
  * 16.0.0  (Currently using 64-bit executable)
    14.17.0 
  
> nvm use 14.17
14.17.0
> npm install -g @zowe/cli
 @zowe/[email protected] postinstall C:\Users\{username}\node_modules\@zowe\cli
> node ./scripts/validatePlugins
Since you re-installed Zowe CLI, we are re-validating any plugins.
_____ Validation results for plugin '@zowe/cics-for-zowe-cli' _____
This plugin was successfully validated. Enjoy the plugin.
_____ Validation results for plugin '@zowe/zos-ftp-for-zowe-cli' _____
This plugin was successfully validated. Enjoy the plugin.
_____ Validation results for plugin '@broadcom/endevor-for-zowe-cli' _____
This plugin was successfully validated. Enjoy the plugin.
_____ Validation results for plugin '@broadcom/endevor-bridge-for-git-for-zowe-cli' _____
This plugin was successfully validated. Enjoy the plugin.
_____ Validation results for plugin '@ibm/rse-api-for-zowe-cli' _____
This plugin was successfully validated. Enjoy the plugin.
_____ Validation results for plugin '@zowe/db2-for-zowe-cli' _____
*** CmdError: Failed to combine command definitions. Reason = Encountered an error loading one of the files (cli/call/Call.definition.js) that matched the provided command module glob for the glob function glob (pattern, options, cb) {
  if (typeof options === 'function') cb = options, options = {}
  if (! options) options = {}
  if (options.sync) {
    if (cb)
      throw new TypeError ('callback provided to sync glob')
    return globSync (pattern, options)
  }
  return new Glob (pattern, options, cb)
}: The module '\\?\C:\Users\{username}\.Zowe\plugins\installed\node_modules\@zowe\db2-for-zowe-cli\node_modules\ibm_db\build\Release\odbc_bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or` npm install`).
This plugin has command errors. No plugin commands will be available.
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\{username}\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\{username}\package.json'
npm WARN {username} No description
npm WARN {username} No repository field.
npm WARN {username} No README data
npm WARN {username} No license field.
+ @zowe/[email protected]
added 287 packages from 202 contributors and audited 287 packages in 84.572s
14 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
> zowe --version
'zowe' is not recognized as an internal command
or external, an executable program or a batch file.
> npm list -g --depth = 0
C:\ProgramData\ nodejs
`- [email protected]
Because of this, the @zowe/cli module cannot be installed on the newly activated node.js version.
To solve the problem, you must:
- switch back to the old node.js version
- uninstall the @zowe/db2-for-zowe-cliplugin
- switch back to the new node.js version
- install the npm @zowe/climodule
- reinstall the @zowe/db2-for-zowe-cliplugin
Metadata
Metadata
Assignees
Labels
Type
Projects
Status