Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline installation with zowe-cli.tgz package in error --> npm ERR! cb() never called! / http fetch GET 407 https://regisfetry.npmjs.org/cpu-features #2099

Closed
FALLAI-Denis opened this issue Mar 24, 2024 · 4 comments
Assignees
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

Comments

@FALLAI-Denis
Copy link

FALLAI-Denis commented Mar 24, 2024

Describe the bug

We don't have the possibility to install Zowe CLI using npm and downloading from the npmjs registry on the internet, (enterprise proxy blocking Internet access outside of web navigator).
We therefore carry out installations from the zowe-cli.tgz packages previously downloaded from the zowe.org internet site.

Expected and actual results

Details about the behavior:

  1. Command issued:

npm install -g zowe-cli.tgz

  1. Expected results:

Installation successfull...

  1. Actual results:

The installation fails with the following messages:

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     https://npm.community/

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<user>\AppData\Roaming\npm-cache\_logs\<date>debug.log
  1. Applicable log files:

Apparently, although the installation is intended to be offline, there is an attempt to download the component cpu-features (line 292) from the npmjs registry, which triggers in our context an http 407 status:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'zowe-cli.tgz'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 89149adb880ec575
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly pacote file manifest for undefined@file:zowe-cli.tgz fetched in 2081ms
8 timing stage:loadCurrentTree Completed in 3426ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 timing stage:loadIdealTree:cloneCurrentTree Completed in 16ms
12 silly install loadShrinkwrap
13 timing stage:loadIdealTree:loadShrinkwrap Completed in 260ms
14 silly install loadAllDepsIntoIdealTree
15 silly resolveWithNewModule @zowe/[email protected] checking installable status
16 silly tarball trying file:C:/Trv/DownLoad/zOS/ZOWE/zowe-cli-package-2.15.0/zowe-cli.tgz by hash: sha512-ozFP+z1SEUFAZtPORh1ApoWPAEBvKqRKiFN844wv/NoIDo62G29R+irHwXs9hKgs/Hj0BJ1nmPzSZL/nxvtR3w==
17 silly extract file:C:/Trv/DownLoad/zOS/ZOWE/zowe-cli-package-2.15.0/zowe-cli.tgz extracted to C:\Users\xxxxxxx\AppData\Local\Temp\npm-45968-e77404a9\unpack-40291d94 (49817ms)
18 silly addBundled read tarball
19 silly cleanup remove extracted module
20 silly removeObsoleteDep removing @zowe/[email protected] from the tree as its been replaced by a newer version or is no longer required
21 silly removeObsoleteDep removing @zowe/[email protected] from the tree as its been replaced by a newer version or is no longer required
[...]
290 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
291 silly removeObsoleteDep removing [email protected] from the tree as its been replaced by a newer version or is no longer required
292 http fetch GET 407 https://registry.npmjs.org/cpu-features 190ms
293 timing npm Completed in 63484ms
294 error cb() never called!
295 error This is an error with npm itself. Please report this error at:
296 error <https://npm.community>

Describe your environment

  • Zowe CLI version installed (run command zowe --version): N/A
  • Installed plug-ins and their version numbers (run command zowe plugins list --short): N/A
  • Node.js and NPM versions installed (run node --version, npm --version): v14.18.0 / 6.14.15
  • Environment variables in use:
  • Operating system and version: Windows 10 Enterprise 22H2 x64
  • Shell/terminal (bash, cmd, powershell, etc...):
  • Daemon mode enabled or disabled: N/A
  • For more information, see Gathering information to troubleshoot Zowe CLI

Additional context

Direct installation of the cpu-features-0.0.1.tgz package triggers another error this time on the plugin nan:
http fetch GET 407 https://registry.npmjs.org/nan

@FALLAI-Denis FALLAI-Denis added bug Something isn't working new The issue wasn't triaged yet labels Mar 24, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Mar 24, 2024
Copy link

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@FALLAI-Denis FALLAI-Denis changed the title Installation impossible in offline mode with the zowe-cli.tgz package --> npm ERR! cb() never called! / http fetch GET 407 https://regisfetry.npmjs.org/cpu-features Offline installation with zowe-cli.tgz package in error --> npm ERR! cb() never called! / http fetch GET 407 https://regisfetry.npmjs.org/cpu-features Mar 25, 2024
@JTonda JTonda added priority-low Legit issue but cosmetic or nice-to-have severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. and removed new The issue wasn't triaged yet labels Mar 25, 2024
@zowe-robot zowe-robot moved this from New Issues to Low Priority in Zowe CLI Squad Mar 25, 2024
@t1m0thyj
Copy link
Member

@FALLAI-Denis Based on the logs your environment is using Node.js 14 and npm@6. Zowe CLI only supports active LTS (Long Term Support) releases of Node, which currently are Node.js 18 and 20.

We believe the offline install error should be fixed in newer versions of npm which is distributed with Node. Please update your installation of Node.js to an actively supported version.

@FALLAI-Denis
Copy link
Author

FALLAI-Denis commented Mar 25, 2024

Hi @t1m0thyj,

A priori this is not a node.js / npm version problem, but rather an Internet access problem.
And moreover we do not have the possibility of changing the version of node.js / npm on our workstations.

By using a proxy server, (Artifactory), to access the npmjs registry, the installation could be carried out both in download mode, (npm install -g @zowe/cli@zowe-v2-lts), and from the latest archive file (npm install -g zowe-cli.tgz).

The problem is that the zowe-cli.tgz archive file still downloads from the Internet, for the plugin cpu-features, which itself downloads for the nan plugin.

This problem should be fixed to allow 100% offline installation.


Furthermore, in the case of installation by npm install -g @zowe/cli@zowe-v2-lts, which is version 7.23.8, it is then impossible to install a plugin: this triggers an error:

>zowe plugins install @zowe/zos-ftp-for-zowe-cli
Handler Instantiation Failed:
Could not instantiate the handler C:\ProgramData\nvm\v14.18.0\node_modules\@zowe\cli\node_modules\@zowe\imperative\lib\imperative\src\plugins\cmd\install\install.handler for command install
Error Details:
Unexpected token '??='

This problem does not appear with the npm install -g zowe-cli.tgz installation, which is in version 7.23.3.

@adam-wolfe
Copy link
Contributor

With Node 16, 18, and 20, Zowe CLI can be installed offline from the zowe-cli.tgz available at zowe.org and plug-in installation works without any issues. However, with Node 14, the offline installation fails and plug-ins cannot be installed.

Zowe CLI supports LTS versions of Node that are actively maintained (currently Node 18 and 20). https://docs.zowe.org/stable/user-guide/systemrequirements-cli

Because these issues only occur in an unsupported version of Node.js, no fix is planned.

@adam-wolfe adam-wolfe closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@github-project-automation github-project-automation bot moved this from Low Priority to Closed in Zowe CLI Squad Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Legit issue but cosmetic or nice-to-have severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Projects
None yet
Development

No branches or pull requests

4 participants