justadudewhohacks/opencv4nodejs

I can no longer install it under the same conditions as a few weeks ago.

shindooo opened this issue · 2 comments

I have been able to install opencv4nodejs in the same machine without any problems, but when I try today, I cannot install it.
Is there any change?

node: v12.20.2

npm init
npm install --save opencv4nodejs

— log

0 verbose cli [
0 verbose cli   '/Users/user/.nodenv/versions/12.20.2/bin/node',
0 verbose cli   '/Users/user/.nodenv/versions/12.20.2/bin/npm',
0 verbose cli   'install',
0 verbose cli   '--save',
0 verbose cli   'opencv4nodejs'
0 verbose cli ]
1 info using npm@7.5.4
2 info using node@v12.20.2
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/Users/user/.nodenv/versions/12.20.2/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/user/development/packtest/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/user/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/Users/user/.nodenv/versions/12.20.2/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 8ms
19 verbose npm-session 5a271054842a3ba4
20 timing npm:load Completed in 16ms
21 timing arborist:ctor Completed in 1ms
22 timing arborist:ctor Completed in 0ms
23 timing idealTree:init Completed in 21ms
24 timing idealTree:userRequests Completed in 2ms
25 silly idealTree buildDeps
26 silly fetch manifest opencv4nodejs@*
27 http fetch GET 304 https://registry.npmjs.org/opencv4nodejs 346ms (from cache)
28 silly placeDep ROOT opencv4nodejs@5.6.0 OK for: packtest@1.0.0 want: *
29 silly fetch manifest @types/node@>6
30 silly fetch manifest nan@^2.14.0
31 silly fetch manifest native-node-utils@^0.2.7
32 silly fetch manifest npmlog@^4.1.2
33 silly fetch manifest opencv-build@^0.1.9
34 http fetch GET 304 https://registry.npmjs.org/nan 85ms (from cache)
35 http fetch GET 304 https://registry.npmjs.org/npmlog 193ms (from cache)
36 http fetch GET 304 https://registry.npmjs.org/native-node-utils 195ms (from cache)
37 http fetch GET 304 https://registry.npmjs.org/opencv-build 196ms (from cache)
38 http fetch GET 304 https://registry.npmjs.org/@types%2fnode 214ms (from cache)
39 timing idealTree:#root Completed in 577ms
40 silly placeDep ROOT @types/node@14.14.31 OK for: opencv4nodejs@5.6.0 want: >6
41 silly placeDep ROOT nan@2.14.2 OK for: opencv4nodejs@5.6.0 want: ^2.14.0
42 silly placeDep ROOT native-node-utils@0.2.7 OK for: opencv4nodejs@5.6.0 want: ^0.2.7
43 silly placeDep ROOT npmlog@4.1.2 OK for: opencv4nodejs@5.6.0 want: ^4.1.2
44 silly placeDep ROOT opencv-build@0.1.9 OK for: opencv4nodejs@5.6.0 want: ^0.1.9
45 silly fetch manifest are-we-there-yet@~1.1.2
46 silly fetch manifest console-control-strings@~1.1.0
47 silly fetch manifest gauge@~2.7.3
48 silly fetch manifest set-blocking@~2.0.0
49 http fetch GET 304 https://registry.npmjs.org/set-blocking 101ms (from cache)
50 http fetch GET 304 https://registry.npmjs.org/are-we-there-yet 115ms (from cache)
51 http fetch GET 304 https://registry.npmjs.org/console-control-strings 109ms (from cache)
52 http fetch GET 304 https://registry.npmjs.org/gauge 111ms (from cache)
53 timing idealTree:node_modules/opencv4nodejs Completed in 134ms
54 timing idealTree:node_modules/@types/node Completed in 0ms
55 timing idealTree:node_modules/nan Completed in 0ms
56 timing idealTree:node_modules/native-node-utils Completed in 0ms
57 silly placeDep ROOT are-we-there-yet@1.1.5 OK for: npmlog@4.1.2 want: ~1.1.2
58 silly placeDep ROOT console-control-strings@1.1.0 OK for: npmlog@4.1.2 want: ~1.1.0
59 silly placeDep ROOT gauge@2.7.4 OK for: npmlog@4.1.2 want: ~2.7.3
60 silly placeDep ROOT set-blocking@2.0.0 OK for: npmlog@4.1.2 want: ~2.0.0
61 silly fetch manifest delegates@^1.0.0
62 silly fetch manifest readable-stream@^2.0.6
63 silly fetch manifest aproba@^1.0.3
64 silly fetch manifest has-unicode@^2.0.0
65 silly fetch manifest object-assign@^4.1.0
66 silly fetch manifest signal-exit@^3.0.0
67 silly fetch manifest string-width@^1.0.1
68 silly fetch manifest strip-ansi@^3.0.1
69 silly fetch manifest wide-align@^1.1.0
70 http fetch GET 304 https://registry.npmjs.org/has-unicode 120ms (from cache)
71 http fetch GET 304 https://registry.npmjs.org/aproba 122ms (from cache)
72 http fetch GET 304 https://registry.npmjs.org/delegates 126ms (from cache)
73 http fetch GET 304 https://registry.npmjs.org/readable-stream 127ms (from cache)
74 http fetch GET 304 https://registry.npmjs.org/object-assign 127ms (from cache)
75 http fetch GET 304 https://registry.npmjs.org/strip-ansi 169ms (from cache)
76 http fetch GET 304 https://registry.npmjs.org/signal-exit 188ms (from cache)
77 http fetch GET 304 https://registry.npmjs.org/string-width 187ms (from cache)
78 http fetch GET 304 https://registry.npmjs.org/wide-align 230ms (from cache)
79 timing idealTree:node_modules/npmlog Completed in 248ms
80 silly placeDep ROOT delegates@1.0.0 OK for: are-we-there-yet@1.1.5 want: ^1.0.0
81 silly placeDep ROOT readable-stream@2.3.7 OK for: are-we-there-yet@1.1.5 want: ^2.0.6
82 silly fetch manifest core-util-is@~1.0.0
83 silly fetch manifest inherits@~2.0.3
84 silly fetch manifest isarray@~1.0.0
85 silly fetch manifest process-nextick-args@~2.0.0
86 silly fetch manifest safe-buffer@~5.1.1
87 silly fetch manifest string_decoder@~1.1.1
88 silly fetch manifest util-deprecate@~1.0.1
89 http fetch GET 304 https://registry.npmjs.org/isarray 133ms (from cache)
90 http fetch GET 304 https://registry.npmjs.org/process-nextick-args 135ms (from cache)
91 http fetch GET 304 https://registry.npmjs.org/string_decoder 133ms (from cache)
92 http fetch GET 304 https://registry.npmjs.org/core-util-is 142ms (from cache)
93 http fetch GET 304 https://registry.npmjs.org/util-deprecate 133ms (from cache)
94 http fetch GET 304 https://registry.npmjs.org/inherits 143ms (from cache)
95 http fetch GET 304 https://registry.npmjs.org/safe-buffer 141ms (from cache)
96 timing idealTree:node_modules/are-we-there-yet Completed in 156ms
97 timing idealTree:node_modules/console-control-strings Completed in 0ms
98 timing idealTree:node_modules/delegates Completed in 0ms
99 silly placeDep ROOT aproba@1.2.0 OK for: gauge@2.7.4 want: ^1.0.3
100 silly placeDep ROOT has-unicode@2.0.1 OK for: gauge@2.7.4 want: ^2.0.0
101 silly placeDep ROOT object-assign@4.1.1 OK for: gauge@2.7.4 want: ^4.1.0
102 silly placeDep ROOT signal-exit@3.0.3 OK for: gauge@2.7.4 want: ^3.0.0
103 silly placeDep ROOT string-width@1.0.2 OK for: gauge@2.7.4 want: ^1.0.1
104 silly placeDep ROOT strip-ansi@3.0.1 OK for: gauge@2.7.4 want: ^3.0.1
105 silly placeDep ROOT wide-align@1.1.3 OK for: gauge@2.7.4 want: ^1.1.0
106 silly fetch manifest code-point-at@^1.0.0
107 silly fetch manifest is-fullwidth-code-point@^1.0.0
108 silly fetch manifest ansi-regex@^2.0.0
109 http fetch GET 304 https://registry.npmjs.org/ansi-regex 103ms (from cache)
110 http fetch GET 304 https://registry.npmjs.org/code-point-at 108ms (from cache)
111 http fetch GET 304 https://registry.npmjs.org/is-fullwidth-code-point 109ms (from cache)
112 timing idealTree:node_modules/gauge Completed in 122ms
113 timing idealTree:node_modules/aproba Completed in 0ms
114 timing idealTree:node_modules/has-unicode Completed in 0ms
115 timing idealTree:node_modules/object-assign Completed in 0ms
116 timing idealTree:node_modules/opencv-build Completed in 0ms
117 silly placeDep ROOT core-util-is@1.0.2 OK for: readable-stream@2.3.7 want: ~1.0.0
118 silly placeDep ROOT inherits@2.0.4 OK for: readable-stream@2.3.7 want: ~2.0.3
119 silly placeDep ROOT isarray@1.0.0 OK for: readable-stream@2.3.7 want: ~1.0.0
120 silly placeDep ROOT process-nextick-args@2.0.1 OK for: readable-stream@2.3.7 want: ~2.0.0
121 silly placeDep ROOT safe-buffer@5.1.2 OK for: readable-stream@2.3.7 want: ~5.1.1
122 silly placeDep ROOT string_decoder@1.1.1 OK for: readable-stream@2.3.7 want: ~1.1.1
123 silly placeDep ROOT util-deprecate@1.0.2 OK for: readable-stream@2.3.7 want: ~1.0.1
124 timing idealTree:node_modules/readable-stream Completed in 5ms
125 timing idealTree:node_modules/core-util-is Completed in 0ms
126 timing idealTree:node_modules/inherits Completed in 0ms
127 timing idealTree:node_modules/isarray Completed in 0ms
128 timing idealTree:node_modules/process-nextick-args Completed in 0ms
129 timing idealTree:node_modules/safe-buffer Completed in 0ms
130 timing idealTree:node_modules/set-blocking Completed in 0ms
131 timing idealTree:node_modules/signal-exit Completed in 0ms
132 timing idealTree:node_modules/string_decoder Completed in 0ms
133 silly placeDep ROOT code-point-at@1.1.0 OK for: string-width@1.0.2 want: ^1.0.0
134 silly placeDep ROOT is-fullwidth-code-point@1.0.0 OK for: string-width@1.0.2 want: ^1.0.0
135 silly fetch manifest number-is-nan@^1.0.0
136 http fetch GET 304 https://registry.npmjs.org/number-is-nan 80ms (from cache)
137 timing idealTree:node_modules/string-width Completed in 83ms
138 timing idealTree:node_modules/code-point-at Completed in 0ms
139 silly placeDep ROOT number-is-nan@1.0.1 OK for: is-fullwidth-code-point@1.0.0 want: ^1.0.0
140 timing idealTree:node_modules/is-fullwidth-code-point Completed in 1ms
141 timing idealTree:node_modules/number-is-nan Completed in 0ms
142 silly placeDep ROOT ansi-regex@2.1.1 OK for: strip-ansi@3.0.1 want: ^2.0.0
143 timing idealTree:node_modules/strip-ansi Completed in 0ms
144 timing idealTree:node_modules/ansi-regex Completed in 0ms
145 timing idealTree:node_modules/util-deprecate Completed in 0ms
146 timing idealTree:node_modules/wide-align Completed in 0ms
147 timing idealTree:buildDeps Completed in 1330ms
148 timing idealTree:fixDepFlags Completed in 1ms
149 timing idealTree Completed in 1356ms
150 timing reify:loadTrees Completed in 1357ms
151 timing reify:diffTrees Completed in 2ms
152 silly reify moves {}
153 timing reify:retireShallow Completed in 0ms
154 timing reify:createSparse Completed in 8ms
155 timing reify:loadBundles Completed in 0ms
156 timing reifyNode:node_modules/ansi-regex Completed in 429ms
157 timing reifyNode:node_modules/number-is-nan Completed in 429ms
158 timing reifyNode:node_modules/process-nextick-args Completed in 441ms
159 timing reifyNode:node_modules/code-point-at Completed in 458ms
160 timing reifyNode:node_modules/strip-ansi Completed in 474ms
161 timing reifyNode:node_modules/is-fullwidth-code-point Completed in 475ms
162 timing reifyNode:node_modules/wide-align Completed in 475ms
163 timing reifyNode:node_modules/has-unicode Completed in 476ms
164 timing reifyNode:node_modules/object-assign Completed in 477ms
165 timing reifyNode:node_modules/aproba Completed in 477ms
166 timing reifyNode:node_modules/string-width Completed in 499ms
167 timing reifyNode:node_modules/console-control-strings Completed in 506ms
168 timing reifyNode:node_modules/set-blocking Completed in 508ms
169 timing reifyNode:node_modules/inherits Completed in 515ms
170 timing reifyNode:node_modules/signal-exit Completed in 557ms
171 timing reifyNode:node_modules/util-deprecate Completed in 582ms
172 timing reifyNode:node_modules/string_decoder Completed in 626ms
173 timing reifyNode:node_modules/safe-buffer Completed in 637ms
174 timing reifyNode:node_modules/isarray Completed in 656ms
175 timing reifyNode:node_modules/npmlog Completed in 666ms
176 timing reifyNode:node_modules/core-util-is Completed in 676ms
177 timing reifyNode:node_modules/delegates Completed in 687ms
178 timing reifyNode:node_modules/are-we-there-yet Completed in 714ms
179 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 720ms
180 timing auditReport:getReport Completed in 722ms
181 timing auditReport:init Completed in 0ms
182 timing reify:audit Completed in 723ms
183 timing reifyNode:node_modules/native-node-utils Completed in 837ms
184 timing reifyNode:node_modules/gauge Completed in 950ms
185 timing reifyNode:node_modules/opencv-build Completed in 1021ms
186 timing reifyNode:node_modules/readable-stream Completed in 1039ms
187 timing reifyNode:node_modules/@types/node Completed in 1176ms
188 timing reifyNode:node_modules/nan Completed in 1183ms
189 timing reifyNode:node_modules/opencv4nodejs Completed in 1782ms
190 timing reify:unpack Completed in 1784ms
191 timing reify:unretire Completed in 0ms
192 timing build:queue Completed in 2ms
193 info run opencv-build@0.1.9 install node_modules/opencv-build node ./install.js
194 info run opencv4nodejs@5.6.0 install node_modules/opencv4nodejs node ./install/install.js
195 info run opencv4nodejs@5.6.0 install { code: 1, signal: null }
196 info run opencv-build@0.1.9 install { code: 1, signal: null }
197 timing reify:rollback:createSparse Completed in 177ms
198 timing reify:rollback:retireShallow Completed in 0ms
199 timing command:install Completed in 3608ms
200 verbose stack Error: command failed
200 verbose stack     at ChildProcess.<anonymous> (/Users/user/.nodenv/versions/12.20.2/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
200 verbose stack     at ChildProcess.emit (events.js:314:20)
200 verbose stack     at maybeClose (internal/child_process.js:1022:16)
200 verbose stack     at Socket.<anonymous> (internal/child_process.js:444:11)
200 verbose stack     at Socket.emit (events.js:314:20)
200 verbose stack     at Pipe.<anonymous> (net.js:675:12)
201 verbose pkgid opencv4nodejs@5.6.0
202 verbose cwd /Users/user/development/packtest
203 verbose Darwin 19.6.0
204 verbose argv "/Users/user/.nodenv/versions/12.20.2/bin/node" "/Users/user/.nodenv/versions/12.20.2/bin/npm" "install" "--save" "opencv4nodejs"
205 verbose node v12.20.2
206 verbose npm  v7.5.4
207 error code 1
208 error path /Users/user/development/packtest/node_modules/opencv4nodejs
209 error command failed
210 error command sh -c node ./install/install.js
211 error info install using lib dir: /Users/user/development/packtest/node_modules/opencv-build/opencv/build/lib
211 error /Users/user/development/packtest/node_modules/opencv4nodejs/install/install.js:37
211 error   throw new Error('library dir does not exist: ' + libDir)
211 error   ^
211 error
211 error Error: library dir does not exist: /Users/user/development/packtest/node_modules/opencv-build/opencv/build/lib
211 error     at Object.<anonymous> (/Users/user/development/packtest/node_modules/opencv4nodejs/install/install.js:37:9)
211 error     at Module._compile (internal/modules/cjs/loader.js:999:30)
211 error     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
211 error     at Module.load (internal/modules/cjs/loader.js:863:32)
211 error     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
211 error     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
211 error     at internal/main/run_main_module.js:17:47
212 verbose exit 1

Thanks.

1 info using npm@7.5.4

Recent installation problems seem strongly related to how npm v7 manages peer dependencies. See #796 and this discussion.
For now, we are stuck with npm v6. If you want to dig into this, I'm willing to give an hand, but can't find much documentation around.

Thanks. It worked out with npm v6.