Snyk: [馃悰] Can't install Snyk CLI

Created on 6 Aug 2020  路  5Comments  路  Source: snyk/snyk

  • node -v: v14.7.0
  • npm -v: 6.14.7
  • snyk -v: Not installed
  • OS: (e.g. OSX, Linux, Windows, ...): Linux
  • Command run: npm install -g snyk

Expected behaviour

I've been installing Snyk CLI in a Docker image through a CI pipeline for months using these commands in a Dockerfile:

RUN apt-get install -y npm
RUN npm cache clear --force
RUN npm install -g n
RUN n latest
RUN npm install -g snyk

Actual behaviour

Snyk CLI wouldn't install.

Steps to reproduce

apt-get install -y npm
npm cache clear --force
npm install -g n
n latest
npm install -g snyk

Debug log

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@snyk/graphlib/-/graphlib-2.1.9-patch.tgz
npm ERR! 404 
npm ERR! 404  '@snyk/[email protected]' 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 It was specified as a dependency of 'snyk'
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!     /root/.npm/_logs/2020-08-06T08_56_32_542Z-debug.log
root@webapi:/opt/cloudmatic/source/core# cat /root/.npm/_logs/2020-08-06T08_56_32_542Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'snyk'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 2720e478b1f8e207
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/snyk 101ms
8 http fetch GET 200 https://registry.npmjs.org/snyk/-/snyk-1.369.3.tgz 644ms
9 silly pacote tag manifest for snyk@latest fetched in 770ms
10 timing stage:loadCurrentTree Completed in 786ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
16 silly install loadAllDepsIntoIdealTree
17 silly resolveWithNewModule [email protected] checking installable status
18 http fetch GET 200 https://registry.npmjs.org/abbrev 46ms
19 http fetch GET 200 https://registry.npmjs.org/ansi-escapes 52ms
20 http fetch GET 200 https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz 18ms
21 silly pacote version manifest for [email protected] fetched in 76ms
22 silly resolveWithNewModule [email protected] checking installable status
23 http fetch GET 200 https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz 33ms
24 silly pacote range manifest for abbrev@^1.1.1 fetched in 83ms
25 silly resolveWithNewModule [email protected] checking installable status
26 http fetch GET 200 https://registry.npmjs.org/chalk 23ms
27 http fetch GET 200 https://registry.npmjs.org/cli-spinner 20ms
28 http fetch GET 200 https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz 31ms
29 http fetch GET 200 https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.10.tgz 30ms
30 silly pacote range manifest for chalk@^2.4.2 fetched in 60ms
31 silly resolveWithNewModule [email protected] checking installable status
32 silly pacote version manifest for [email protected] fetched in 57ms
33 silly resolveWithNewModule [email protected] checking installable status
34 http fetch GET 200 https://registry.npmjs.org/configstore 20ms
35 http fetch GET 200 https://registry.npmjs.org/debug 21ms
36 http fetch GET 200 https://registry.npmjs.org/debug/-/debug-4.1.1.tgz 21ms
37 http fetch GET 200 https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz 26ms
38 silly pacote range manifest for debug@^4.1.1 fetched in 47ms
39 silly resolveWithNewModule [email protected] checking installable status
40 silly pacote range manifest for configstore@^5.0.1 fetched in 52ms
41 silly resolveWithNewModule [email protected] checking installable status
42 http fetch GET 200 https://registry.npmjs.org/glob 20ms
43 http fetch GET 200 https://registry.npmjs.org/diff 23ms
44 http fetch GET 200 https://registry.npmjs.org/diff/-/diff-4.0.2.tgz 27ms
45 http fetch GET 200 https://registry.npmjs.org/glob/-/glob-7.1.6.tgz 35ms
46 silly pacote range manifest for diff@^4.0.1 fetched in 60ms
47 silly resolveWithNewModule [email protected] checking installable status
48 silly pacote range manifest for glob@^7.1.3 fetched in 61ms
49 silly resolveWithNewModule [email protected] checking installable status
50 http fetch GET 200 https://registry.npmjs.org/needle 21ms
51 http fetch GET 200 https://registry.npmjs.org/open 23ms
52 http fetch GET 200 https://registry.npmjs.org/needle/-/needle-2.5.0.tgz 29ms
53 silly pacote range manifest for needle@^2.5.0 fetched in 55ms
54 silly resolveWithNewModule [email protected] checking installable status
55 http fetch GET 200 https://registry.npmjs.org/open/-/open-7.1.0.tgz 28ms
56 silly pacote range manifest for open@^7.0.3 fetched in 55ms
57 silly resolveWithNewModule [email protected] checking installable status
58 http fetch GET 200 https://registry.npmjs.org/os-name 17ms
59 http fetch GET 200 https://registry.npmjs.org/proxy-agent 19ms
60 http fetch GET 200 https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.1.1.tgz 19ms
61 http fetch GET 200 https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz 25ms
62 silly pacote range manifest for proxy-agent@^3.1.1 fetched in 43ms
63 silly resolveWithNewModule [email protected] checking installable status
64 silly pacote range manifest for os-name@^3.0.0 fetched in 49ms
65 silly resolveWithNewModule [email protected] checking installable status
66 http fetch GET 200 https://registry.npmjs.org/proxy-from-env 18ms
67 http fetch GET 200 https://registry.npmjs.org/semver 23ms
68 http fetch GET 200 https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz 18ms
69 silly pacote range manifest for proxy-from-env@^1.0.0 fetched in 40ms
70 silly resolveWithNewModule [email protected] checking installable status
71 http fetch GET 200 https://registry.npmjs.org/semver/-/semver-6.3.0.tgz 23ms
72 silly pacote range manifest for semver@^6.0.0 fetched in 51ms
73 silly resolveWithNewModule [email protected] checking installable status
74 http fetch GET 200 https://registry.npmjs.org/snyk-docker-plugin 18ms
75 http fetch GET 200 https://registry.npmjs.org/snyk-docker-plugin/-/snyk-docker-plugin-3.16.0.tgz 33ms
76 silly pacote version manifest for [email protected] fetched in 56ms
77 silly resolveWithNewModule [email protected] checking installable status
78 http fetch GET 200 https://registry.npmjs.org/snyk-go-plugin 18ms
79 http fetch GET 200 https://registry.npmjs.org/snyk-go-plugin/-/snyk-go-plugin-1.16.0.tgz 22ms
80 silly pacote version manifest for [email protected] fetched in 47ms
81 silly resolveWithNewModule [email protected] checking installable status
82 http fetch GET 200 https://registry.npmjs.org/snyk-gradle-plugin 21ms
83 http fetch GET 200 https://registry.npmjs.org/snyk-gradle-plugin/-/snyk-gradle-plugin-3.5.1.tgz 22ms
84 silly pacote version manifest for [email protected] fetched in 46ms
85 silly resolveWithNewModule [email protected] checking installable status
86 http fetch GET 200 https://registry.npmjs.org/snyk-module 23ms
87 http fetch GET 200 https://registry.npmjs.org/snyk-module/-/snyk-module-3.1.0.tgz 18ms
88 silly pacote version manifest for [email protected] fetched in 44ms
89 silly resolveWithNewModule [email protected] checking installable status
90 http fetch GET 200 https://registry.npmjs.org/snyk-mvn-plugin 17ms
91 http fetch GET 200 https://registry.npmjs.org/snyk-mvn-plugin/-/snyk-mvn-plugin-2.18.2.tgz 19ms
92 silly pacote version manifest for [email protected] fetched in 39ms
93 silly resolveWithNewModule [email protected] checking installable status
94 http fetch GET 200 https://registry.npmjs.org/snyk-nodejs-lockfile-parser 16ms
95 http fetch GET 200 https://registry.npmjs.org/snyk-nodejs-lockfile-parser/-/snyk-nodejs-lockfile-parser-1.26.3.tgz 24ms
96 silly pacote version manifest for [email protected] fetched in 44ms
97 silly resolveWithNewModule [email protected] checking installable status
98 http fetch GET 200 https://registry.npmjs.org/snyk-nuget-plugin 18ms
99 http fetch GET 200 https://registry.npmjs.org/snyk-nuget-plugin/-/snyk-nuget-plugin-1.18.1.tgz 42ms
100 silly pacote version manifest for [email protected] fetched in 64ms
101 silly resolveWithNewModule [email protected] checking installable status
102 http fetch GET 200 https://registry.npmjs.org/snyk-php-plugin 17ms
103 http fetch GET 200 https://registry.npmjs.org/snyk-php-plugin/-/snyk-php-plugin-1.9.0.tgz 19ms
104 silly pacote version manifest for [email protected] fetched in 40ms
105 silly resolveWithNewModule [email protected] checking installable status
106 http fetch GET 200 https://registry.npmjs.org/snyk-policy 23ms
107 http fetch GET 200 https://registry.npmjs.org/snyk-policy/-/snyk-policy-1.14.1.tgz 17ms
108 silly pacote version manifest for [email protected] fetched in 45ms
109 silly resolveWithNewModule [email protected] checking installable status
110 http fetch GET 200 https://registry.npmjs.org/snyk-python-plugin 22ms
111 http fetch GET 200 https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-1.17.1.tgz 22ms
112 silly pacote version manifest for [email protected] fetched in 50ms
113 silly resolveWithNewModule [email protected] checking installable status
114 http fetch GET 200 https://registry.npmjs.org/snyk-resolve 17ms
115 http fetch GET 200 https://registry.npmjs.org/snyk-resolve/-/snyk-resolve-1.0.1.tgz 19ms
116 silly pacote version manifest for [email protected] fetched in 39ms
117 silly resolveWithNewModule [email protected] checking installable status
118 http fetch GET 200 https://registry.npmjs.org/snyk-resolve-deps 26ms
119 http fetch GET 200 https://registry.npmjs.org/snyk-resolve-deps/-/snyk-resolve-deps-4.4.0.tgz 17ms
120 silly pacote version manifest for [email protected] fetched in 48ms
121 silly resolveWithNewModule [email protected] checking installable status
122 http fetch GET 200 https://registry.npmjs.org/snyk-sbt-plugin 18ms
123 http fetch GET 200 https://registry.npmjs.org/snyk-sbt-plugin/-/snyk-sbt-plugin-2.11.0.tgz 41ms
124 silly pacote version manifest for [email protected] fetched in 63ms
125 silly resolveWithNewModule [email protected] checking installable status
126 http fetch GET 200 https://registry.npmjs.org/snyk-tree 19ms
127 http fetch GET 200 https://registry.npmjs.org/snyk-tree/-/snyk-tree-1.0.0.tgz 23ms
128 silly pacote range manifest for snyk-tree@^1.0.0 fetched in 45ms
129 silly resolveWithNewModule [email protected] checking installable status
130 http fetch GET 200 https://registry.npmjs.org/snyk-try-require 15ms
131 http fetch GET 200 https://registry.npmjs.org/snyk-try-require/-/snyk-try-require-1.3.1.tgz 25ms
132 silly pacote version manifest for [email protected] fetched in 44ms
133 silly resolveWithNewModule [email protected] checking installable status
134 http fetch GET 200 https://registry.npmjs.org/source-map-support 18ms
135 http fetch GET 200 https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz 21ms
136 silly pacote range manifest for source-map-support@^0.5.11 fetched in 44ms
137 silly resolveWithNewModule [email protected] checking installable status
138 http fetch GET 200 https://registry.npmjs.org/strip-ansi 20ms
139 http fetch GET 200 https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz 17ms
140 silly pacote range manifest for strip-ansi@^5.2.0 fetched in 40ms
141 silly resolveWithNewModule [email protected] checking installable status
142 http fetch GET 200 https://registry.npmjs.org/snyk-config 826ms
143 http fetch GET 200 https://registry.npmjs.org/tempfile 24ms
144 http fetch GET 200 https://registry.npmjs.org/snyk-config/-/snyk-config-3.1.0.tgz 16ms
145 silly pacote version manifest for [email protected] fetched in 845ms
146 silly resolveWithNewModule [email protected] checking installable status
147 http fetch GET 200 https://registry.npmjs.org/update-notifier 16ms
148 http fetch GET 200 https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz 23ms
149 silly pacote range manifest for tempfile@^2.0.0 fetched in 49ms
150 silly resolveWithNewModule [email protected] checking installable status
151 http fetch GET 200 https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz 20ms
152 http fetch GET 200 https://registry.npmjs.org/uuid 19ms
153 silly pacote range manifest for update-notifier@^4.1.0 fetched in 40ms
154 silly resolveWithNewModule [email protected] checking installable status
155 http fetch GET 200 https://registry.npmjs.org/wrap-ansi 19ms
156 http fetch GET 200 https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz 21ms
157 silly pacote range manifest for uuid@^3.3.2 fetched in 44ms
158 silly resolveWithNewModule [email protected] checking installable status
159 http fetch GET 200 https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz 18ms
160 silly pacote range manifest for wrap-ansi@^5.1.0 fetched in 40ms
161 silly resolveWithNewModule [email protected] checking installable status
162 http fetch GET 200 https://registry.npmjs.org/@snyk%2fgraphlib 4099ms
163 http fetch GET 404 https://registry.npmjs.org/@snyk%2fcli-interface 13040ms
164 http fetch GET 404 https://registry.npmjs.org/@snyk%2fgemfile 13050ms
165 http fetch GET 404 https://registry.npmjs.org/@snyk%2finquirer 13049ms
166 http fetch GET 404 https://registry.npmjs.org/@snyk%2fsnyk-cocoapods-plugin 13049ms
167 http fetch GET 404 https://registry.npmjs.org/@snyk%2fdep-graph 13057ms
168 http fetch GET 404 https://registry.npmjs.org/@snyk%2fruby-semver 13054ms
169 http fetch GET 404 https://registry.npmjs.org/@snyk%2flodash 13054ms
170 http fetch GET 200 https://registry.npmjs.org/@snyk%2fcli-interface 32ms
171 silly pacote version manifest for @snyk/[email protected] fetched in 13077ms
172 silly resolveWithNewModule @snyk/[email protected] checking installable status
173 http fetch GET 200 https://registry.npmjs.org/@snyk%2fgemfile 38ms
174 http fetch GET 200 https://registry.npmjs.org/@snyk%2flodash 32ms
175 http fetch GET 200 https://registry.npmjs.org/@snyk%2fdep-graph 38ms
176 http fetch GET 200 https://registry.npmjs.org/@snyk%2finquirer 43ms
177 http fetch GET 200 https://registry.npmjs.org/@snyk%2fsnyk-cocoapods-plugin 45ms
178 silly pacote version manifest for @snyk/[email protected] fetched in 13101ms
179 silly resolveWithNewModule @snyk/[email protected] checking installable status
180 silly pacote range manifest for @snyk/lodash@^4.17.15-patch fetched in 13099ms
181 silly resolveWithNewModule @snyk/[email protected] checking installable status
182 http fetch GET 200 https://registry.npmjs.org/@snyk%2fruby-semver 44ms
183 silly pacote version manifest for @snyk/[email protected] fetched in 13104ms
184 silly resolveWithNewModule @snyk/[email protected] checking installable status
185 silly pacote version manifest for @snyk/[email protected] fetched in 13102ms
186 silly resolveWithNewModule @snyk/[email protected] checking installable status
187 silly pacote version manifest for @snyk/[email protected] fetched in 13103ms
188 silly resolveWithNewModule @snyk/[email protected] checking installable status
189 silly pacote version manifest for @snyk/[email protected] fetched in 13103ms
190 silly resolveWithNewModule @snyk/[email protected] checking installable status
191 http fetch GET 404 https://registry.npmjs.org/@snyk/graphlib/-/graphlib-2.1.9-patch.tgz 23300ms
192 silly fetchPackageMetaData error for @snyk/[email protected] 404 Not Found - GET https://registry.npmjs.org/@snyk/graphlib/-/graphlib-2.1.9-patch.tgz
193 timing stage:rollbackFailedOptional Completed in 0ms
194 timing stage:runTopLevelLifecycles Completed in 28211ms
195 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/@snyk/graphlib/-/graphlib-2.1.9-patch.tgz
195 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:114:15
195 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:93:5)
196 verbose statusCode 404
197 verbose pkgid @snyk/[email protected]
198 verbose cwd /opt/cloudmatic/source/core
199 verbose Linux 3.10.0-1127.el7.x86_64
200 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "snyk"
201 verbose node v14.7.0
202 verbose npm  v6.14.7
203 error code E404
204 error 404 Not Found - GET https://registry.npmjs.org/@snyk/graphlib/-/graphlib-2.1.9-patch.tgz
205 error 404
206 error 404 '@snyk/[email protected]' is not in the npm registry.
207 error 404 You should bug the author to publish it (or use the name yourself!)
208 error 404 It was specified as a dependency of 'snyk'
209 error 404 Note that you can also install from a
210 error 404 tarball, folder, http url, or git url.
211 verbose exit [ 1, true ]

answered

All 5 comments

+1, having the same issue when installing the package npm-cli-login which uses snyk as a dependency

Can this be looked please , got some broken pipelines that are not running because of this!

@alterEgo123 @DanielWhite-1990 @tobyhersey, unfortunately, npm is not feeling well right now.

https://status.npmjs.org/

I'm getting this:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@snyk%2fcli-interface - Not found
npm ERR! 404
npm ERR! 404 '@snyk/[email protected]' 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 It was specified as a dependency of 'snyk'

Verbose:
188 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/@snyk%2fcli-interface - Not found
188 verbose stack at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:114:15
188 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
189 verbose statusCode 404
190 verbose pkgid @snyk/[email protected]
191 verbose cwd /Users/pawelkrupinski/code/vehicle-partnership-service
192 verbose Darwin 19.6.0
193 verbose argv "/usr/local/Cellar/node/14.7.0/bin/node" "/usr/local/bin/npm" "install" "-g" "snyk"
194 verbose node v14.7.0
195 verbose npm v6.14.7
196 error code E404
197 error 404 Not Found - GET https://registry.npmjs.org/@snyk%2fcli-interface - Not found
198 error 404
199 error 404 '@snyk/[email protected]' is not in the npm registry.
200 error 404 You should bug the author to publish it (or use the name yourself!)
201 error 404 It was specified as a dependency of 'snyk'
202 error 404 Note that you can also install from a
203 error 404 tarball, folder, http url, or git url.
204 verbose exit [ 1, true ]

Npm is working fine again and the error is no longer reproducible so I'm closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwaynebailey picture dwaynebailey  路  4Comments

smockle picture smockle  路  4Comments

alexanderkozlenko picture alexanderkozlenko  路  6Comments

Drjacky picture Drjacky  路  3Comments

alvaropinot picture alvaropinot  路  6Comments