0

I'm trying to deploy a simple nodejs app on web hosting and when I "Run NPM Install", it throws an error message that I am unfamiliar with. I can see that its related to one of the npm packages (connect-flash) but I am not sure how to solve this issue. Bellow is the full log:

0 verbose cli /opt/alt/alt-nodejs18/root/usr/bin/node /opt/alt/alt-nodejs18/root/usr/bin/npm
1 info using npm@8.19.1
2 info using node@v18.9.1
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:/opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 3ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/home/emlaterc/nodevenv/nodejs/18/lib/.npmrc Completed in 0ms
10 timing config:load:project Completed in 0ms
11 timing config:load:file:/home/emlaterc/.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/home/emlaterc/nodevenv/nodejs/18/lib/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 37ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 47ms
19 timing npm:load:configload Completed in 47ms
20 timing npm:load:mkdirpcache Completed in 127ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm install
23 verbose argv "install" "--prefix" "/home/emlaterc/nodevenv/nodejs/18/lib"
24 timing npm:load:setTitle Completed in 1ms
25 timing config:load:flatten Completed in 6ms
26 timing npm:load:display Completed in 7ms
27 verbose logfile logs-max:10 dir:/home/emlaterc/.npm/_logs
28 verbose logfile /home/emlaterc/.npm/_logs/2023-03-08T20_56_39_058Z-debug-0.log
29 timing npm:load:logFile Completed in 9ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 194ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile done cleaning log files
35 timing arborist:ctor Completed in 0ms
36 timing idealTree:init Completed in 123ms
37 timing idealTree:userRequests Completed in 0ms
38 silly idealTree buildDeps
39 silly fetch manifest connect-flash@^0.1.1
40 silly fetch manifest ejs@^3.1.8
41 silly fetch manifest ejs-mate@^4.0.0
42 silly fetch manifest express@^4.18.2
43 silly fetch manifest express-session@^1.17.3
44 silly fetch manifest joi@^17.7.0
45 silly fetch manifest method-override@^3.0.0
46 silly fetch manifest mongoose@^6.8.2
47 silly fetch manifest path@^0.12.7
48 silly fetch manifest passport@^0.6.0
49 silly fetch manifest passport-local@^1.0.0
50 silly fetch manifest passport-local-mongoose@^7.1.2
51 silly placeDep ROOT connect-flash@ OK for: 519@1.0.0 want: ^0.1.1
52 silly placeDep ROOT ejs@ OK for: 519@1.0.0 want: ^3.1.8
53 silly placeDep ROOT ejs-mate@ OK for: 519@1.0.0 want: ^4.0.0
54 silly placeDep ROOT express@ OK for: 519@1.0.0 want: ^4.18.2
55 silly placeDep ROOT express-session@ OK for: 519@1.0.0 want: ^1.17.3
56 silly placeDep ROOT joi@ OK for: 519@1.0.0 want: ^17.7.0
57 silly placeDep ROOT method-override@ OK for: 519@1.0.0 want: ^3.0.0
58 silly placeDep ROOT mongoose@ OK for: 519@1.0.0 want: ^6.8.2
59 silly placeDep ROOT passport@ OK for: 519@1.0.0 want: ^0.6.0
60 silly placeDep ROOT passport-local@ OK for: 519@1.0.0 want: ^1.0.0
61 silly placeDep ROOT passport-local-mongoose@ OK for: 519@1.0.0 want: ^7.1.2
62 silly placeDep ROOT path@ OK for: 519@1.0.0 want: ^0.12.7
63 timing idealTree:#root Completed in 841761ms
64 timing idealTree:node_modules/connect-flash Completed in 0ms
65 timing idealTree:node_modules/ejs Completed in 0ms
66 timing idealTree:node_modules/ejs-mate Completed in 0ms
67 timing idealTree:node_modules/express Completed in 0ms
68 timing idealTree:node_modules/express-session Completed in 0ms
69 timing idealTree:node_modules/joi Completed in 0ms
70 timing idealTree:node_modules/method-override Completed in 0ms
71 timing idealTree:node_modules/mongoose Completed in 0ms
72 timing idealTree:node_modules/passport Completed in 0ms
73 timing idealTree:node_modules/passport-local Completed in 0ms
74 timing idealTree:node_modules/passport-local-mongoose Completed in 0ms
75 timing idealTree:node_modules/path Completed in 0ms
76 timing idealTree:buildDeps Completed in 841764ms
77 timing idealTree:fixDepFlags Completed in 1ms
78 timing idealTree Completed in 841891ms
79 timing command:install Completed in 841899ms
80 verbose type system
81 verbose stack FetchError: request to https://registry.npmjs.org/connect-flash failed, reason: unable to get local issuer certificate
81 verbose stack     at ClientRequest.<anonymous> (/opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/minipass-fetch/lib/index.js:130:14)
81 verbose stack     at ClientRequest.emit (node:events:513:28)
81 verbose stack     at TLSSocket.socketErrorListener (node:_http_client:494:9)
81 verbose stack     at TLSSocket.emit (node:events:525:35)
81 verbose stack     at emitErrorNT (node:internal/streams/destroy:151:8)
81 verbose stack     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
81 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
82 verbose cwd /home/emlaterc/nodejs
83 verbose Linux 3.10.0-962.3.2.lve1.5.76.el7.x86_64
84 verbose node v18.9.1
85 verbose npm  v8.19.1
86 error code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
87 error errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
88 error request to https://registry.npmjs.org/connect-flash failed, reason: unable to get local issuer certificate
89 verbose exit 1
90 timing npm Completed in 843237ms
91 verbose unfinished npm timer reify 1678309000325
92 verbose unfinished npm timer reify:loadTrees 1678309000329
93 verbose code 1
94 error A complete log of this run can be found in:
94 error     /home/emlaterc/.npm/_logs/2023-03-08T20_56_39_058Z-debug-0.log
CodeMonkey
  • 2,511
  • 4
  • 27
  • 38
  • 1
    Does this answer your question? [npm ERR! code UNABLE\_TO\_GET\_ISSUER\_CERT\_LOCALLY](https://stackoverflow.com/questions/45884752/npm-err-code-unable-to-get-issuer-cert-locally) – Marc Mar 09 '23 at 09:44
  • yes I have, and it didn't help. I'm still getting the same error – CodeMonkey Mar 09 '23 at 17:05

0 Answers0