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

when do offline install I get -> error code ENOTCACHED ,error request to https://registry.npmjs.org/@jessety%2feslint-config failed. #51

Open
yobeidat opened this issue Jan 26, 2022 · 2 comments

Comments

@yobeidat
Copy link

yobeidat commented Jan 26, 2022

Description
When to do offline install I get the error in the log below

Steps to Reproduce
1.npm run bundle on internet connect machine same window,npm,node version as offline machine
2.on offline machine run following commands
npm run configure
npm run configure-policy
npm run setup

Environment

[email protected] info
node ./src/bundle-info/current.js

Running on: 1/26/2022, pm2-installer 3.3.1 with node v16.13.2 and npm 8.1.2 on win32-10.0.14393.

Log
PS C:\Windows\system32> cd C:\pm2-installer-main
PS C:\pm2-installer-main> npm run setup

[email protected] setup
node ./src/tools/script-for-os.js

[email protected] setup:windows
PowerShell -NoProfile -ExecutionPolicy Bypass src\windows\setup.ps1

=== Setup ===
=== Checking Script Privileges ===
Script is running as administrator.
=== Checking Script Privileges Complete ===
=== Checking npm Configuration ===
Global npm prefix location appears valid: C:\ProgramData\npm\npm
Global npm cache location appears valid: C:\ProgramData\npm\npm-cache
=== Checking npm Configuration Complete ===
=== Install Packages ===
Running on: 1/26/2022, pm2-installer 3.3.1 with node v16.13.2 and npm 8.1.2 on win32-10.0.14393.
Using:
[email protected]
@jessety/[email protected]
[email protected]
Checking connectivity to the npm registry..
Could not connect to registry.npmjs.org: getaddrinfo ENOTFOUND registry.npmjs.org
Cannot connect to the npm registry. Checking for offline bundle..
Cache zip bundle detected. Decompressing..
Decompressing .\bundle.zip took 25 seconds.
Bundled on: 1/26/2022, pm2-installer 3.3.1 with node v16.13.2 and npm 8.1.2 on win32-10.0.14393.
√ Offline install bundle appears valid.
Cache verified and compressed (C:\pm2-installer-main.npm_cache_cacache)
Content verified: 583 (18175114 bytes)
Index entries: 583
Finished in 18.309s
Installing packages..

changed 181 packages in 17s

changed 207 packages in 18s

changed 5 packages in 718ms
Installing packages took 38 seconds.
Linking node-windows..
npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/@jessety%2feslint-config failed: cache mode is 'only-if-cached'
ched response is available.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\ProgramData\npm\npm-cache_logs\2022-01-26T10_07_22_921Z-debug.log
Unblocking script at C:\ProgramData\npm\npm\pm2.ps1..
=== Install Packages Complete: took 90 seconds ===
=== Creating Service ===
Determining pm2 installation directory..
Determining Local Service user name ("S-1-5-19")..
Configuration:
PM2_HOME: C:\ProgramData\pm2\home
PM2_SERVICE_DIRECTORY: C:\ProgramData\pm2\service
PM2_INSTALL_DIRECTORY: C:\ProgramData\npm\npm\node_modules\pm2
Service User: NT AUTHORITY\LOCAL SERVICE

Attempting to create "C:\ProgramData\pm2\home"
Directory "C:\ProgramData\pm2\home" already exists, no need to create it.
Attempting to create "C:\ProgramData\pm2\service"
Directory "C:\ProgramData\pm2\service" already exists, no need to create it.
Copying service files from ".\src\windows\service" to "C:\ProgramData\pm2\service"..
Copying files complete.
Attempting to grant "NT AUTHORITY\LOCAL SERVICE" full permissions to "C:\ProgramData\pm2\home".
Successfully set permissions on "C:\ProgramData\pm2\home".
Attempting to grant "NT AUTHORITY\LOCAL SERVICE" full permissions to "C:\ProgramData\pm2\service".
Successfully set permissions on "C:\ProgramData\pm2\service".
Running Node service install script..
service-management\install Installing
Could not load "node-windows", likely because it has already been uninstalled.
Attempting to grant "NT AUTHORITY\LOCAL SERVICE" full permissions to "C:\ProgramData\pm2\home".
Successfully set permissions on "C:\ProgramData\pm2\home".
Attempting to grant "NT AUTHORITY\LOCAL SERVICE" full permissions to "C:\ProgramData\pm2\service".
Successfully set permissions on "C:\ProgramData\pm2\service".
Updating "pm2.exe" service to run as "NT AUTHORITY\LocalService"
Attempt #2 to locate "pm2.exe" service..
Attempt #3 to locate "pm2.exe" service..
Attempt #4 to locate "pm2.exe" service..
Attempt #5 to locate "pm2.exe" service..
Attempt #6 to locate "pm2.exe" service..
Attempt #7 to locate "pm2.exe" service..
Attempt #8 to locate "pm2.exe" service..
Attempt #9 to locate "pm2.exe" service..
Attempt #10 to locate "pm2.exe" service..

@zrhpwr
Copy link

zrhpwr commented Mar 4, 2022

I could workaround this issue, when I commented the code for deletion of the node_modules folder in bundle.ps1->
Write-Host "Removing uncompressed cache folder.." #Remove-Item $node_modules -recurse | Out-Null #Remove-Item $cache_folder -recurse | Out-Null

seems to have something to do with this...

@yobeidat
Copy link
Author

yobeidat commented Mar 4, 2022

I could workaround this issue, when I commented the code for deletion of the node_modules folder in bundle.ps1-> Write-Host "Removing uncompressed cache folder.." #Remove-Item $node_modules -recurse | Out-Null #Remove-Item $cache_folder -recurse | Out-Null

seems to have something to do with this...

Thank you the workaround worked for me. Really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants