Cannot install agentkeepalive

Hello. I am new at this…

When I run:
npm install agentkeepalive

It gives me:
Cannot find module agentkeepalive.

Google didn’t help. Can you help? What am I doing wrong?

Thanks.

Is that error from the install, rather than from trying to use agentkeepalive in code?

I was not able to reproduce and see quite a different error when I install a missing module. Could you copy-and-paste what you see?

$ npm install sdkhjdfskjhkhjdfskhjdfs
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/sdkhjdfskjhkhjdfskhjdfs - Not found
npm ERR! 404 
npm ERR! 404  'sdkhjdfskjhkhjdfskhjdfs@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jgee/.npm/_logs/2019-09-13T05_42_12_533Z-debug.log

This is what I see:
C:\Users\info>npm install agentkeepalive
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module ‘agentkeepalive’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\info\AppData\Roaming\npm-cache_logs\2019-09-13T02_24_24_437Z-debug.log

In case you want to see it, this is in the debug.log file:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Vue\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\info\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'agentkeepalive' ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose config Skipping project config: C:\Users\info/.npmrc. (matches userconfig)
5 verbose npm-session 6f0132d780daf6df
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 silly fetchPackageMetaData error for agentkeepalive@latest Cannot find module 'agentkeepalive'
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 45ms
11 verbose stack Error: Cannot find module 'agentkeepalive'
11 verbose stack     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
11 verbose stack     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
11 verbose stack     at Module.require (internal/modules/cjs/loader.js:692:17)
11 verbose stack     at require (internal/modules/cjs/helpers.js:25:18)
11 verbose stack     at getAgent (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\make-fetch-happen\agent.js:43:18)
11 verbose stack     at remoteFetch (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\make-fetch-happen\index.js:310:17)
11 verbose stack     at opts.cacheManager.match.then.res (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\make-fetch-happen\index.js:172:14)
11 verbose stack     at tryCatcher (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
11 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
11 verbose stack     at Promise._settlePromise (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
11 verbose stack     at Promise._settlePromise0 (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
11 verbose stack     at Promise._settlePromises (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:694:18)
11 verbose stack     at Promise._fulfill (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:638:18)
11 verbose stack     at Promise._resolveCallback (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:432:57)
11 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:524:17)
11 verbose stack     at Promise._settlePromise (C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
12 verbose cwd C:\Users\info
13 verbose Windows_NT 10.0.18362
14 verbose argv "C:\\Vue\\nodejs\\node.exe" "C:\\Users\\info\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "agentkeepalive"
15 verbose node v10.16.3
16 verbose npm  v6.9.0
17 error code MODULE_NOT_FOUND
18 error Cannot find module 'agentkeepalive'
19 verbose exit [ 1, true ]

Thanks, next question would have been for the log! I do not recognise the error, hopefully someone does.

I’m not having much success.
I am on a Windows PC. Do you know the relationship between the two node_modules directories:

(a) C:\Program Files\nodejs\node_modules\npm\node_modules
and
(b) C:\Users\info\AppData\Roaming\npm\node_modules\npm\node_modules

I found that copying the agentkeepalive and bluebird directories from (a) to (b) did let me go further, but it still gets stuck. And the copied files disappear from (b).

I have tried reinstalling nodejs a few times.

Any ideas?
If not, I don’t know where to ask for help on this. Can you suggest a forum where I can ask?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.