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

node: cairo-pattern.c:1127: cairo_pattern_destroy: Assertion failed. none - catched error #1357

Closed
anysite opened this issue Jan 18, 2019 · 36 comments · Fixed by #1422
Closed
Assignees
Labels

Comments

@anysite
Copy link

anysite commented Jan 18, 2019

Issue or Feature

When using canvas to render image from pdf by pdf.js on server side.
With some pdf files (but not all of them) I got this error:
node: cairo-pattern.c:1127: cairo_pattern_destroy: Assertion `(_cairo_atomic_int_get (&(&pattern->ref_count)->ref_count) > 0)' failed. Program node index.js exited with code null

no way to catch the error and proceed my script.
I paste here my code even the real rendering (I assume) is deep into pdf.js code.
The file itself is also private, so I can't attach it.

what I expect to have

At least catchable error. Not to have it all would be better, of course.

Steps to Reproduce

let scale_required = this.canvas.width / this.page.getViewport(1).width,
            viewport = this.page.getViewport(scale_required),
            renderContext = {
                canvasContext: this.ctx,
                viewport: viewport
            },
await this.page.render(renderContext);

Your Environment

  • canvas@2.3.1
  • Ubuntu 18
@zbjornson zbjornson added the Bug label Jan 18, 2019
@zbjornson
Copy link
Collaborator

This sounds like a bug in cairo. Can you post an example PDF that causes this consistently, and ideally the full code to run it (e.g. I'm not sure what this is in your example) please?

@asturur
Copy link
Contributor

asturur commented Mar 9, 2019

i have the same bug, reproductible with fabricJS and i m working to replicate it in plain JS code.

Assertion failed: (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)), function cairo_pattern_destroy, file cairo-pattern.c, line 1127.

The bug arised moving fabricJS tests and library from canvas 1.x to canvas 2 ( actually the bug is stopping the migration ) this happens during test UTs.

@asturur
Copy link
Contributor

asturur commented Mar 9, 2019

As an additional reference, the error does not happen running the test file alone, it happens only running a multitude of tests one after another,

@anysite
Copy link
Author

anysite commented Mar 10, 2019

As I wrote, I can't attach the PDF because it's sensitive file. Sorry.
this.ctx is canvas context:

this.ctx = canvas.getContext("2d");

@asturur
Copy link
Contributor

asturur commented Mar 10, 2019

i mean, can you reproduce without the sensitive information?

On my side i found how to avoid the error, but not how to reproduce it outside the lot of code i have.

trying

@lvauvillier
Copy link

lvauvillier commented May 7, 2019

Hi, i have the same issue here using node canvas and pdfjs.

This is a file to reproduce :
https://seafile.milibris.com/f/d001f89877/?dl=1

This is my sample code:

const Canvas = require('canvas');
const assert = require('assert');
const fs = require('fs');
const util = require('util');
const jsdom = require('jsdom');
const pdfjsLib = require('pdfjs-dist');

const writeFile = util.promisify(fs.writeFile);

const dom = new jsdom.JSDOM(`...`);
global['document'] = dom.window.document;

class NodeCanvasFactory {
  create(width, height) {
    assert(width > 0 && height > 0, 'Invalid canvas size');
    const canvas = Canvas.createCanvas(width, height);
    const context = canvas.getContext('2d');
    return {
      canvas: canvas,
      context: context,
    };
  }

  reset(canvasAndContext, width, height) {
    assert(canvasAndContext.canvas, 'Canvas is not specified');
    assert(width > 0 && height > 0, 'Invalid canvas size');
    canvasAndContext.canvas.width = width;
    canvasAndContext.canvas.height = height;
  }

  destroy(canvasAndContext) {
    assert(canvasAndContext.canvas, 'Canvas is not specified');

    // Zeroing the width and height cause Firefox to release graphics
    // resources immediately, which can greatly reduce memory consumption.
    canvasAndContext.canvas.width = 0;
    canvasAndContext.canvas.height = 0;
    canvasAndContext.canvas = null;
    canvasAndContext.context = null;
  }
};

async function main (){
  // Relative path of the PDF file.
  const pdfURL = './test.pdf';
  
  // Read the PDF file into a typed array so PDF.js can load it.
  const rawData = new Uint8Array(fs.readFileSync(pdfURL));
  
  // Load the PDF file.
  pdfDocument = await pdfjsLib.getDocument(rawData).promise;

  for (let i = 1; i <= pdfDocument.numPages; i++) {
    console.log('page', i);
    // Get page
    const page = await pdfDocument.getPage(i);

    // Render the page on a Node canvas with 100% scale.
    const viewport = page.getViewport(1.0);
    const canvasFactory = new NodeCanvasFactory();
    const canvasAndContext = canvasFactory.create(viewport.width, viewport.height);
    const renderContext = {
      canvasContext: canvasAndContext.context,
      viewport: viewport,
      canvasFactory: canvasFactory,
    };

    await page.render(renderContext).promise;
    const image = canvasAndContext.canvas.toBuffer();
    await writeFile(`page_${i}.png`, image);
  }
}

main();

Here is my results:

node v11.10.1
node-canvas 2.4.1

run 1:

page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
Warning: Required "glyf" table is not found -- trying to recover.
page 28
Assertion failed: (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)), function cairo_pattern_destroy, file cairo-pattern.c, line 1127.
Abort trap: 6

run 2:

page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
Warning: Required "glyf" table is not found -- trying to recover.
page 28
Segmentation fault: 11

It seems not related to page 28 particulary, starting to page 27 works fine to the end.

starting to page 25 fails on page 26:

page 25
page 26
Assertion failed: (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&pattern->ref_count)), function cairo_pattern_destroy, file cairo-pattern.c, line 1127.
Abort trap: 6

Hope this helps :)

@lvauvillier
Copy link

Here is the full stack trace in debug mode
This happened just after a GC Request

Capture d’écran 2019-05-07 à 14 41 20

@zbjornson zbjornson self-assigned this May 7, 2019
@eard7
Copy link

eard7 commented May 8, 2019

@asturur can you describe the workaround you're using to avoid the error? I'm having the same issue using Fabricjs and running unit tests. My "workaround" is disposing the fabric canvas after each test.

@sheikalthaf
Copy link

@zbjornson still facing this issue in latest version of canvas

@zbjornson
Copy link
Collaborator

@sheikalthaf can you post repro info please?

@lvauvillier
Copy link

@zbjornson same issue

Please find a project to reproduce:
https://github.com/lvauvillier/node-canvas-issue

Thanks for your help !

@zbjornson
Copy link
Collaborator

Thanks @lvauvillier , I'll try to take a look later this week.

@lvauvillier
Copy link

@zbjornson tell me if you need help or more test pdfs

@sattaman
Copy link

im hitting this too, although not using pdfs

@sattaman
Copy link

sattaman commented Sep 26, 2019

I've found it doesn't happen if in my tests I add a delay before each

beforeEach(async () => {
    // a bug in canvas is causing a crash, this stops it happening
    await new Promise(resolve => setTimeout(resolve, 100));

update - it seems to still happen sometimes :(

@ashifa454
Copy link

any solution/workaround for this problem?

@sattaman
Copy link

sattaman commented Oct 2, 2019

@zbjornson can we reopen this bug?

@zbjornson
Copy link
Collaborator

Sorry for the delay, hoping to work on this this week.

@zbjornson zbjornson reopened this Oct 2, 2019
@zbjornson
Copy link
Collaborator

The crash @lvauvillier posted is fixed by 7baaecf, so we just need to make a release. (Or folks can build from source, https://github.com/Automattic/node-canvas#compiling.) @LinusU ? :)

Sorry for the delay realizing that was the only issue!

@LinusU
Copy link
Collaborator

LinusU commented Oct 6, 2019

Cut a new release as 2.6.1 🚀

install it with npm install canvas@next to try it out :)

@lvauvillier
Copy link

lvauvillier commented Oct 7, 2019

Hi @zbjornson @LinusU , thanks a lot for your fix

But i cannot install it... Here is my npm log file :

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   'canvas@next' ]
2 info using npm@6.11.3
3 info using node@v10.16.0
4 verbose npm-session e062dc5fe56b0de1
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/canvas 97ms (from cache)
8 silly pacote tag manifest for canvas@next fetched in 104ms
9 timing stage:loadCurrentTree Completed in 868ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 4ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 417ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule canvas@2.6.1 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/simple-get 41ms (from cache)
18 silly pacote range manifest for simple-get@^3.0.3 fetched in 43ms
19 silly resolveWithNewModule simple-get@3.1.0 checking installable status
20 http fetch GET 304 https://registry.npmjs.org/nan 54ms (from cache)
21 silly pacote range manifest for nan@^2.14.0 fetched in 57ms
22 silly resolveWithNewModule nan@2.14.0 checking installable status
23 http fetch GET 304 https://registry.npmjs.org/node-pre-gyp 63ms (from cache)
24 silly pacote range manifest for node-pre-gyp@^0.11.0 fetched in 65ms
25 silly resolveWithNewModule node-pre-gyp@0.11.0 checking installable status
26 http fetch GET 304 https://registry.npmjs.org/nopt 35ms (from cache)
27 http fetch GET 304 https://registry.npmjs.org/rc 34ms (from cache)
28 silly pacote range manifest for nopt@^4.0.1 fetched in 37ms
29 silly resolveWithNewModule nopt@4.0.1 checking installable status
30 silly pacote range manifest for rc@^1.2.7 fetched in 39ms
31 silly resolveWithNewModule rc@1.2.8 checking installable status
32 http fetch GET 304 https://registry.npmjs.org/detect-libc 44ms (from cache)
33 silly pacote range manifest for detect-libc@^1.0.2 fetched in 46ms
34 silly resolveWithNewModule detect-libc@1.0.3 checking installable status
35 http fetch GET 304 https://registry.npmjs.org/npm-packlist 47ms (from cache)
36 silly pacote range manifest for npm-packlist@^1.1.6 fetched in 48ms
37 silly resolveWithNewModule npm-packlist@1.4.4 checking installable status
38 http fetch GET 304 https://registry.npmjs.org/needle 59ms (from cache)
39 silly pacote range manifest for needle@^2.2.1 fetched in 60ms
40 silly resolveWithNewModule needle@2.4.0 checking installable status
41 http fetch GET 304 https://registry.npmjs.org/debug 23ms (from cache)
42 silly pacote range manifest for debug@^3.2.6 fetched in 24ms
43 silly resolveWithNewModule debug@3.2.6 checking installable status
44 http fetch GET 304 https://registry.npmjs.org/ms 21ms (from cache)
45 silly pacote range manifest for ms@^2.1.1 fetched in 22ms
46 silly resolveWithNewModule ms@2.1.2 checking installable status
47 http fetch GET 304 https://registry.npmjs.org/ignore-walk 26ms (from cache)
48 silly pacote range manifest for ignore-walk@^3.0.1 fetched in 29ms
49 silly resolveWithNewModule ignore-walk@3.0.2 checking installable status
50 http fetch GET 304 https://registry.npmjs.org/npm-bundled 31ms (from cache)
51 silly pacote range manifest for npm-bundled@^1.0.1 fetched in 32ms
52 silly resolveWithNewModule npm-bundled@1.0.6 checking installable status
53 http fetch GET 304 https://registry.npmjs.org/ini 25ms (from cache)
54 silly pacote range manifest for ini@~1.3.0 fetched in 27ms
55 silly resolveWithNewModule ini@1.3.5 checking installable status
56 http fetch GET 304 https://registry.npmjs.org/deep-extend 364ms (from cache)
57 silly pacote range manifest for deep-extend@^0.6.0 fetched in 365ms
58 silly resolveWithNewModule deep-extend@0.6.0 checking installable status
59 http fetch GET 304 https://registry.npmjs.org/decompress-response 42ms (from cache)
60 silly pacote range manifest for decompress-response@^4.2.0 fetched in 44ms
61 silly resolveWithNewModule decompress-response@4.2.1 checking installable status
62 http fetch GET 304 https://registry.npmjs.org/simple-concat 103ms (from cache)
63 silly pacote range manifest for simple-concat@^1.0.0 fetched in 103ms
64 silly resolveWithNewModule simple-concat@1.0.0 checking installable status
65 http fetch GET 304 https://registry.npmjs.org/mimic-response 23ms (from cache)
66 silly pacote range manifest for mimic-response@^2.0.0 fetched in 23ms
67 silly resolveWithNewModule mimic-response@2.0.0 checking installable status
68 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1264ms
69 timing stage:loadIdealTree Completed in 1843ms
[...]
72 silly install generateActionsToTake
73 timing stage:generateActionsToTake Completed in 37ms
74 silly diffTrees action count 18
75 silly diffTrees add deep-extend@0.6.0
76 silly diffTrees add detect-libc@1.0.3
77 silly diffTrees add ignore-walk@3.0.2
78 silly diffTrees add ini@1.3.5
79 silly diffTrees add mimic-response@2.0.0
80 silly diffTrees add decompress-response@4.2.1
81 silly diffTrees add ms@2.1.2
82 silly diffTrees add debug@3.2.6
83 silly diffTrees add needle@2.4.0
84 silly diffTrees add nopt@4.0.1
85 silly diffTrees add npm-bundled@1.0.6
86 silly diffTrees add npm-packlist@1.4.4
87 silly diffTrees add rc@1.2.8
88 silly diffTrees add simple-concat@1.0.0
89 silly diffTrees add nan@2.14.0
90 silly diffTrees add node-pre-gyp@0.11.0
91 silly diffTrees add simple-get@3.1.0
92 silly diffTrees add canvas@2.6.1
93 silly decomposeActions action count 144
94 silly decomposeActions fetch deep-extend@0.6.0
95 silly decomposeActions extract deep-extend@0.6.0
96 silly decomposeActions preinstall deep-extend@0.6.0
97 silly decomposeActions build deep-extend@0.6.0
98 silly decomposeActions install deep-extend@0.6.0
99 silly decomposeActions postinstall deep-extend@0.6.0
100 silly decomposeActions finalize deep-extend@0.6.0
101 silly decomposeActions refresh-package-json deep-extend@0.6.0
102 silly decomposeActions fetch detect-libc@1.0.3
103 silly decomposeActions extract detect-libc@1.0.3
104 silly decomposeActions preinstall detect-libc@1.0.3
105 silly decomposeActions build detect-libc@1.0.3
106 silly decomposeActions install detect-libc@1.0.3
107 silly decomposeActions postinstall detect-libc@1.0.3
108 silly decomposeActions finalize detect-libc@1.0.3
109 silly decomposeActions refresh-package-json detect-libc@1.0.3
110 silly decomposeActions fetch ignore-walk@3.0.2
111 silly decomposeActions extract ignore-walk@3.0.2
112 silly decomposeActions preinstall ignore-walk@3.0.2
113 silly decomposeActions build ignore-walk@3.0.2
114 silly decomposeActions install ignore-walk@3.0.2
115 silly decomposeActions postinstall ignore-walk@3.0.2
116 silly decomposeActions finalize ignore-walk@3.0.2
117 silly decomposeActions refresh-package-json ignore-walk@3.0.2
118 silly decomposeActions fetch ini@1.3.5
119 silly decomposeActions extract ini@1.3.5
120 silly decomposeActions preinstall ini@1.3.5
121 silly decomposeActions build ini@1.3.5
122 silly decomposeActions install ini@1.3.5
123 silly decomposeActions postinstall ini@1.3.5
124 silly decomposeActions finalize ini@1.3.5
125 silly decomposeActions refresh-package-json ini@1.3.5
126 silly decomposeActions fetch mimic-response@2.0.0
127 silly decomposeActions extract mimic-response@2.0.0
128 silly decomposeActions preinstall mimic-response@2.0.0
129 silly decomposeActions build mimic-response@2.0.0
130 silly decomposeActions install mimic-response@2.0.0
131 silly decomposeActions postinstall mimic-response@2.0.0
132 silly decomposeActions finalize mimic-response@2.0.0
133 silly decomposeActions refresh-package-json mimic-response@2.0.0
134 silly decomposeActions fetch decompress-response@4.2.1
135 silly decomposeActions extract decompress-response@4.2.1
136 silly decomposeActions preinstall decompress-response@4.2.1
137 silly decomposeActions build decompress-response@4.2.1
138 silly decomposeActions install decompress-response@4.2.1
139 silly decomposeActions postinstall decompress-response@4.2.1
140 silly decomposeActions finalize decompress-response@4.2.1
141 silly decomposeActions refresh-package-json decompress-response@4.2.1
142 silly decomposeActions fetch ms@2.1.2
143 silly decomposeActions extract ms@2.1.2
144 silly decomposeActions preinstall ms@2.1.2
145 silly decomposeActions build ms@2.1.2
146 silly decomposeActions install ms@2.1.2
147 silly decomposeActions postinstall ms@2.1.2
148 silly decomposeActions finalize ms@2.1.2
149 silly decomposeActions refresh-package-json ms@2.1.2
150 silly decomposeActions fetch debug@3.2.6
151 silly decomposeActions extract debug@3.2.6
152 silly decomposeActions preinstall debug@3.2.6
153 silly decomposeActions build debug@3.2.6
154 silly decomposeActions install debug@3.2.6
155 silly decomposeActions postinstall debug@3.2.6
156 silly decomposeActions finalize debug@3.2.6
157 silly decomposeActions refresh-package-json debug@3.2.6
158 silly decomposeActions fetch needle@2.4.0
159 silly decomposeActions extract needle@2.4.0
160 silly decomposeActions preinstall needle@2.4.0
161 silly decomposeActions build needle@2.4.0
162 silly decomposeActions install needle@2.4.0
163 silly decomposeActions postinstall needle@2.4.0
164 silly decomposeActions finalize needle@2.4.0
165 silly decomposeActions refresh-package-json needle@2.4.0
166 silly decomposeActions fetch nopt@4.0.1
167 silly decomposeActions extract nopt@4.0.1
168 silly decomposeActions preinstall nopt@4.0.1
169 silly decomposeActions build nopt@4.0.1
170 silly decomposeActions install nopt@4.0.1
171 silly decomposeActions postinstall nopt@4.0.1
172 silly decomposeActions finalize nopt@4.0.1
173 silly decomposeActions refresh-package-json nopt@4.0.1
174 silly decomposeActions fetch npm-bundled@1.0.6
175 silly decomposeActions extract npm-bundled@1.0.6
176 silly decomposeActions preinstall npm-bundled@1.0.6
177 silly decomposeActions build npm-bundled@1.0.6
178 silly decomposeActions install npm-bundled@1.0.6
179 silly decomposeActions postinstall npm-bundled@1.0.6
180 silly decomposeActions finalize npm-bundled@1.0.6
181 silly decomposeActions refresh-package-json npm-bundled@1.0.6
182 silly decomposeActions fetch npm-packlist@1.4.4
183 silly decomposeActions extract npm-packlist@1.4.4
184 silly decomposeActions preinstall npm-packlist@1.4.4
185 silly decomposeActions build npm-packlist@1.4.4
186 silly decomposeActions install npm-packlist@1.4.4
187 silly decomposeActions postinstall npm-packlist@1.4.4
188 silly decomposeActions finalize npm-packlist@1.4.4
189 silly decomposeActions refresh-package-json npm-packlist@1.4.4
190 silly decomposeActions fetch rc@1.2.8
191 silly decomposeActions extract rc@1.2.8
192 silly decomposeActions preinstall rc@1.2.8
193 silly decomposeActions build rc@1.2.8
194 silly decomposeActions install rc@1.2.8
195 silly decomposeActions postinstall rc@1.2.8
196 silly decomposeActions finalize rc@1.2.8
197 silly decomposeActions refresh-package-json rc@1.2.8
198 silly decomposeActions fetch simple-concat@1.0.0
199 silly decomposeActions extract simple-concat@1.0.0
200 silly decomposeActions preinstall simple-concat@1.0.0
201 silly decomposeActions build simple-concat@1.0.0
202 silly decomposeActions install simple-concat@1.0.0
203 silly decomposeActions postinstall simple-concat@1.0.0
204 silly decomposeActions finalize simple-concat@1.0.0
205 silly decomposeActions refresh-package-json simple-concat@1.0.0
206 silly decomposeActions fetch nan@2.14.0
207 silly decomposeActions extract nan@2.14.0
208 silly decomposeActions preinstall nan@2.14.0
209 silly decomposeActions build nan@2.14.0
210 silly decomposeActions install nan@2.14.0
211 silly decomposeActions postinstall nan@2.14.0
212 silly decomposeActions finalize nan@2.14.0
213 silly decomposeActions refresh-package-json nan@2.14.0
214 silly decomposeActions fetch node-pre-gyp@0.11.0
215 silly decomposeActions extract node-pre-gyp@0.11.0
216 silly decomposeActions preinstall node-pre-gyp@0.11.0
217 silly decomposeActions build node-pre-gyp@0.11.0
218 silly decomposeActions install node-pre-gyp@0.11.0
219 silly decomposeActions postinstall node-pre-gyp@0.11.0
220 silly decomposeActions finalize node-pre-gyp@0.11.0
221 silly decomposeActions refresh-package-json node-pre-gyp@0.11.0
222 silly decomposeActions fetch simple-get@3.1.0
223 silly decomposeActions extract simple-get@3.1.0
224 silly decomposeActions preinstall simple-get@3.1.0
225 silly decomposeActions build simple-get@3.1.0
226 silly decomposeActions install simple-get@3.1.0
227 silly decomposeActions postinstall simple-get@3.1.0
228 silly decomposeActions finalize simple-get@3.1.0
229 silly decomposeActions refresh-package-json simple-get@3.1.0
230 silly decomposeActions fetch canvas@2.6.1
231 silly decomposeActions extract canvas@2.6.1
232 silly decomposeActions preinstall canvas@2.6.1
233 silly decomposeActions build canvas@2.6.1
234 silly decomposeActions install canvas@2.6.1
235 silly decomposeActions postinstall canvas@2.6.1
236 silly decomposeActions finalize canvas@2.6.1
237 silly decomposeActions refresh-package-json canvas@2.6.1
238 silly install executeActions
239 silly doSerial global-install 144
240 verbose correctMkdir /Users/luc/.npm/_locks correctMkdir not in flight; initializing
241 verbose lock using /Users/luc/.npm/_locks/staging-c21124085dcc109e.lock for /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging
242 silly doParallel extract 18
243 silly extract deep-extend@0.6.0
244 silly extract detect-libc@1.0.3
245 silly extract ignore-walk@3.0.2
246 silly extract ini@1.3.5
247 silly extract mimic-response@2.0.0
248 silly extract decompress-response@4.2.1
249 silly extract ms@2.1.2
250 silly extract debug@3.2.6
251 silly extract needle@2.4.0
252 silly extract nopt@4.0.1
253 silly extract npm-bundled@1.0.6
254 silly extract npm-packlist@1.4.4
255 silly extract rc@1.2.8
256 silly extract simple-concat@1.0.0
257 silly extract nan@2.14.0
258 silly extract node-pre-gyp@0.11.0
259 silly extract simple-get@3.1.0
260 silly extract canvas@2.6.1
261 silly tarball trying deep-extend@^0.6.0 by hash: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
262 silly tarball trying detect-libc@^1.0.2 by hash: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
263 silly tarball trying ignore-walk@^3.0.1 by hash: sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==
264 silly tarball trying ini@~1.3.0 by hash: sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
265 silly tarball trying mimic-response@^2.0.0 by hash: sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ==
266 silly tarball trying decompress-response@^4.2.0 by hash: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==
267 silly tarball trying ms@^2.1.1 by hash: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
268 silly tarball trying debug@^3.2.6 by hash: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
269 silly tarball trying needle@^2.2.1 by hash: sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
270 silly tarball trying nopt@^4.0.1 by hash: sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
271 silly tarball trying npm-bundled@^1.0.1 by hash: sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==
272 silly tarball trying npm-packlist@^1.1.6 by hash: sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==
273 silly tarball trying rc@^1.2.7 by hash: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
274 silly tarball trying simple-concat@^1.0.0 by hash: sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=
275 silly tarball trying nan@^2.14.0 by hash: sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
276 silly tarball trying node-pre-gyp@^0.11.0 by hash: sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==
277 silly tarball trying simple-get@^3.0.3 by hash: sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==
278 silly tarball trying canvas@next by hash: sha512-S98rKsPcuhfTcYbtF53UIJhcbgIAK533d1kJKMwsMwAIFgfd58MOyxRud3kktlzWiEkFliaJtvyZCBtud/XVEA==
279 silly extract simple-get@^3.0.3 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/simple-get-0af033f0 (68ms)
280 silly extract ignore-walk@^3.0.1 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/ignore-walk-f4b6fcd1 (70ms)
281 silly extract ini@~1.3.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/ini-82d2936e (69ms)
282 silly extract ms@^2.1.1 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/ms-17df8dae (69ms)
283 silly extract mimic-response@^2.0.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/mimic-response-9dfcd238 (69ms)
284 silly extract npm-bundled@^1.0.1 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/npm-bundled-d26867ba (70ms)
285 silly extract npm-packlist@^1.1.6 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/npm-packlist-22ab74bb (70ms)
286 silly extract decompress-response@^4.2.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/decompress-response-159e1c64 (70ms)
287 silly extract deep-extend@^0.6.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/deep-extend-f3e2c18c (73ms)
288 silly extract simple-concat@^1.0.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/simple-concat-58434657 (73ms)
289 silly extract detect-libc@^1.0.2 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/detect-libc-82e1177b (75ms)
290 silly extract debug@^3.2.6 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/debug-ec054ba8 (76ms)
291 silly extract rc@^1.2.7 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/rc-cf0b8463 (76ms)
292 silly extract nopt@^4.0.1 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/nopt-967070c1 (76ms)
293 silly extract node-pre-gyp@^0.11.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/node-pre-gyp-7133b594 (82ms)
294 silly extract needle@^2.2.1 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/needle-ad680ad6 (86ms)
295 silly extract nan@^2.14.0 extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/nan-7a13c900 (88ms)
296 silly extract canvas@next extracted to /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging/canvas-c766df9c (89ms)
297 timing action:extract Completed in 92ms
298 silly doReverseSerial unbuild 144
299 silly doSerial remove 144
300 silly doSerial move 144
301 silly doSerial finalize 144
302 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/deep-extend
303 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/detect-libc
304 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/ignore-walk
305 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/ini
306 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/mimic-response
307 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/decompress-response
308 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules/ms
309 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules/debug
310 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle
311 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/nopt
312 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/npm-bundled
313 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/npm-packlist
314 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/rc
315 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/simple-concat
316 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas/node_modules/nan
317 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/node-pre-gyp
318 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/simple-get
319 silly finalize /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas
320 timing action:finalize Completed in 31ms
321 silly doParallel refresh-package-json 18
322 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/deep-extend
323 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/detect-libc
324 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/ignore-walk
325 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/ini
326 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/mimic-response
327 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/decompress-response
328 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules/ms
329 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules/debug
330 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle
331 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/nopt
332 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/npm-bundled
333 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/npm-packlist
334 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/rc
335 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/simple-concat
336 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas/node_modules/nan
337 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/node-pre-gyp
338 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/simple-get
339 silly refresh-package-json /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas
340 timing action:refresh-package-json Completed in 39ms
341 silly doParallel preinstall 18
342 silly preinstall deep-extend@0.6.0
343 info lifecycle deep-extend@0.6.0~preinstall: deep-extend@0.6.0
344 silly preinstall detect-libc@1.0.3
345 info lifecycle detect-libc@1.0.3~preinstall: detect-libc@1.0.3
346 silly preinstall ignore-walk@3.0.2
347 info lifecycle ignore-walk@3.0.2~preinstall: ignore-walk@3.0.2
348 silly preinstall ini@1.3.5
349 info lifecycle ini@1.3.5~preinstall: ini@1.3.5
350 silly preinstall mimic-response@2.0.0
351 info lifecycle mimic-response@2.0.0~preinstall: mimic-response@2.0.0
352 silly preinstall decompress-response@4.2.1
353 info lifecycle decompress-response@4.2.1~preinstall: decompress-response@4.2.1
354 silly preinstall ms@2.1.2
355 info lifecycle ms@2.1.2~preinstall: ms@2.1.2
356 silly preinstall debug@3.2.6
357 info lifecycle debug@3.2.6~preinstall: debug@3.2.6
358 silly preinstall needle@2.4.0
359 info lifecycle needle@2.4.0~preinstall: needle@2.4.0
360 silly preinstall nopt@4.0.1
361 info lifecycle nopt@4.0.1~preinstall: nopt@4.0.1
362 silly preinstall npm-bundled@1.0.6
363 info lifecycle npm-bundled@1.0.6~preinstall: npm-bundled@1.0.6
364 silly preinstall npm-packlist@1.4.4
365 info lifecycle npm-packlist@1.4.4~preinstall: npm-packlist@1.4.4
366 silly preinstall rc@1.2.8
367 info lifecycle rc@1.2.8~preinstall: rc@1.2.8
368 silly preinstall simple-concat@1.0.0
369 info lifecycle simple-concat@1.0.0~preinstall: simple-concat@1.0.0
370 silly preinstall nan@2.14.0
371 info lifecycle nan@2.14.0~preinstall: nan@2.14.0
372 silly preinstall node-pre-gyp@0.11.0
373 info lifecycle node-pre-gyp@0.11.0~preinstall: node-pre-gyp@0.11.0
374 silly preinstall simple-get@3.1.0
375 info lifecycle simple-get@3.1.0~preinstall: simple-get@3.1.0
376 silly preinstall canvas@2.6.1
377 info lifecycle canvas@2.6.1~preinstall: canvas@2.6.1
378 timing action:preinstall Completed in 2ms
379 silly doSerial build 144
380 silly build deep-extend@0.6.0
381 info linkStuff deep-extend@0.6.0
382 silly linkStuff deep-extend@0.6.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
383 silly build detect-libc@1.0.3
384 info linkStuff detect-libc@1.0.3
385 silly linkStuff detect-libc@1.0.3 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
386 verbose linkBins [ { 'detect-libc': './bin/detect-libc.js' },
386 verbose linkBins   '/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin',
386 verbose linkBins   false ]
387 silly build ignore-walk@3.0.2
388 info linkStuff ignore-walk@3.0.2
389 silly linkStuff ignore-walk@3.0.2 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
390 silly build ini@1.3.5
391 info linkStuff ini@1.3.5
392 silly linkStuff ini@1.3.5 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
393 silly build mimic-response@2.0.0
394 info linkStuff mimic-response@2.0.0
395 silly linkStuff mimic-response@2.0.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
396 silly build decompress-response@4.2.1
397 info linkStuff decompress-response@4.2.1
398 silly linkStuff decompress-response@4.2.1 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
399 silly build ms@2.1.2
400 info linkStuff ms@2.1.2
401 silly linkStuff ms@2.1.2 has /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules as its parent node_modules
402 silly build debug@3.2.6
403 info linkStuff debug@3.2.6
404 silly linkStuff debug@3.2.6 has /Users/luc/Documents/workspace/js/node-pdf/node_modules/needle/node_modules as its parent node_modules
405 silly build needle@2.4.0
406 info linkStuff needle@2.4.0
407 silly linkStuff needle@2.4.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
408 verbose linkBins [ { needle: './bin/needle' },
408 verbose linkBins   '/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin',
408 verbose linkBins   false ]
409 silly build nopt@4.0.1
410 info linkStuff nopt@4.0.1
411 silly linkStuff nopt@4.0.1 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
412 verbose linkBins [ { nopt: './bin/nopt.js' },
412 verbose linkBins   '/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin',
412 verbose linkBins   false ]
413 silly build npm-bundled@1.0.6
414 info linkStuff npm-bundled@1.0.6
415 silly linkStuff npm-bundled@1.0.6 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
416 silly build npm-packlist@1.4.4
417 info linkStuff npm-packlist@1.4.4
418 silly linkStuff npm-packlist@1.4.4 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
419 silly build rc@1.2.8
420 info linkStuff rc@1.2.8
421 silly linkStuff rc@1.2.8 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
422 verbose linkBins [ { rc: './cli.js' },
422 verbose linkBins   '/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin',
422 verbose linkBins   false ]
423 silly build simple-concat@1.0.0
424 info linkStuff simple-concat@1.0.0
425 silly linkStuff simple-concat@1.0.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
426 silly build nan@2.14.0
427 info linkStuff nan@2.14.0
428 silly linkStuff nan@2.14.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas/node_modules as its parent node_modules
429 silly build node-pre-gyp@0.11.0
430 info linkStuff node-pre-gyp@0.11.0
431 silly linkStuff node-pre-gyp@0.11.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
432 verbose linkBins [ { 'node-pre-gyp': './bin/node-pre-gyp' },
432 verbose linkBins   '/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin',
432 verbose linkBins   false ]
433 silly build simple-get@3.1.0
434 info linkStuff simple-get@3.1.0
435 silly linkStuff simple-get@3.1.0 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
436 silly build canvas@2.6.1
437 info linkStuff canvas@2.6.1
438 silly linkStuff canvas@2.6.1 has /Users/luc/Documents/workspace/js/node-pdf/node_modules as its parent node_modules
439 timing action:build Completed in 14ms
440 silly doSerial global-link 144
441 silly doParallel update-linked 0
442 silly doSerial install 144
443 silly install deep-extend@0.6.0
444 info lifecycle deep-extend@0.6.0~install: deep-extend@0.6.0
445 silly install detect-libc@1.0.3
446 info lifecycle detect-libc@1.0.3~install: detect-libc@1.0.3
447 silly install ignore-walk@3.0.2
448 info lifecycle ignore-walk@3.0.2~install: ignore-walk@3.0.2
449 silly install ini@1.3.5
450 info lifecycle ini@1.3.5~install: ini@1.3.5
451 silly install mimic-response@2.0.0
452 info lifecycle mimic-response@2.0.0~install: mimic-response@2.0.0
453 silly install decompress-response@4.2.1
454 info lifecycle decompress-response@4.2.1~install: decompress-response@4.2.1
455 silly install ms@2.1.2
456 info lifecycle ms@2.1.2~install: ms@2.1.2
457 silly install debug@3.2.6
458 info lifecycle debug@3.2.6~install: debug@3.2.6
459 silly install needle@2.4.0
460 info lifecycle needle@2.4.0~install: needle@2.4.0
461 silly install nopt@4.0.1
462 info lifecycle nopt@4.0.1~install: nopt@4.0.1
463 silly install npm-bundled@1.0.6
464 info lifecycle npm-bundled@1.0.6~install: npm-bundled@1.0.6
465 silly install npm-packlist@1.4.4
466 info lifecycle npm-packlist@1.4.4~install: npm-packlist@1.4.4
467 silly install rc@1.2.8
468 info lifecycle rc@1.2.8~install: rc@1.2.8
469 silly install simple-concat@1.0.0
470 info lifecycle simple-concat@1.0.0~install: simple-concat@1.0.0
471 silly install nan@2.14.0
472 info lifecycle nan@2.14.0~install: nan@2.14.0
473 silly install node-pre-gyp@0.11.0
474 info lifecycle node-pre-gyp@0.11.0~install: node-pre-gyp@0.11.0
475 silly install simple-get@3.1.0
476 info lifecycle simple-get@3.1.0~install: simple-get@3.1.0
477 silly install canvas@2.6.1
478 info lifecycle canvas@2.6.1~install: canvas@2.6.1
479 verbose lifecycle canvas@2.6.1~install: unsafe-perm in lifecycle true
480 verbose lifecycle canvas@2.6.1~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas/node_modules/.bin:/Users/luc/Documents/workspace/js/node-pdf/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
481 verbose lifecycle canvas@2.6.1~install: CWD: /Users/luc/Documents/workspace/js/node-pdf/node_modules/canvas
482 silly lifecycle canvas@2.6.1~install: Args: [ '-c', 'node-pre-gyp install --fallback-to-build' ]
483 timing audit submit Completed in 592ms
484 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 591ms
485 timing audit body Completed in 0ms
486 silly lifecycle canvas@2.6.1~install: Returned: code: 1  signal: null
487 info lifecycle canvas@2.6.1~install: Failed to exec install script
488 timing action:install Completed in 2219ms
489 verbose unlock done using /Users/luc/.npm/_locks/staging-c21124085dcc109e.lock for /Users/luc/Documents/workspace/js/node-pdf/node_modules/.staging
490 timing stage:rollbackFailedOptional Completed in 39ms
491 timing stage:runTopLevelLifecycles Completed in 6367ms
[...]
493 warn pdf@1.0.0 No repository field.
494 verbose stack Error: canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
494 verbose stack Exit status 1
494 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
494 verbose stack     at EventEmitter.emit (events.js:198:13)
494 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
494 verbose stack     at ChildProcess.emit (events.js:198:13)
494 verbose stack     at maybeClose (internal/child_process.js:982:16)
494 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
495 verbose pkgid canvas@2.6.1
496 verbose cwd /Users/luc/Documents/workspace/js/node-pdf
497 verbose Darwin 18.7.0
498 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas@next"
499 verbose node v10.16.0
500 verbose npm  v6.11.3
501 error code ELIFECYCLE
502 error errno 1
503 error canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
503 error Exit status 1
504 error Failed at the canvas@2.6.1 install script.
504 error This is probably not a problem with npm. There is likely additional logging output above.
505 verbose exit [ 1, true ]

@sattaman
Copy link

sattaman commented Oct 7, 2019

failing for me too

@sattaman
Copy link

sattaman commented Oct 7, 2019

[4/4] 🔨  Building fresh packages...
error /Users/tom/Documents/chartrenderer/node_modules/canvas: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/tom/Documents/chartrenderer/node_modules/canvas
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@10.16.3 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release/canvas.node" (not found)
node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-darwin-unknown-x64.tar.gz
node-pre-gyp http 404 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-darwin-unknown-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-darwin-unknown-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@10.16.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v64-darwin-unknown-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.16.3 | darwin | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.16.3 | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/tom/Documents/chartrenderer/node_modules/canvas/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/tom/.node-gyp/10.16.3/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/tom/.node-gyp/10.16.3',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/tom/.node-gyp/10.16.3/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/tom/Documents/chartrenderer/node_modules/canvas',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" "--python=/usr/bin/python"
gyp ERR! cwd /Users/tom/Documents/chartrenderer/node_modules/canvas
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=/usr/bin/python' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/tom/Documents/chartrenderer/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/tom/Documents/chartrenderer/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/tom/Documents/chartrenderer/node_modules/canvas
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/tom/Documents/chartrenderer/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=/usr/bin/python' (1)
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@LinusU
Copy link
Collaborator

LinusU commented Oct 7, 2019

Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found

Note that we don't have pre-builds for 2.6.1 yet, so you have to install the prerequisites for building in order for it to work:

brew install pkg-config cairo pango libpng jpeg giflib librsvg

When pre-builds are available we will promote it from @next to the normal release tag :)

@lvauvillier
Copy link

lvauvillier commented Oct 7, 2019

Thanks.
I confirm this fixes the problem :)
Thanks again for your amazing work.

@anysite
Copy link
Author

anysite commented Oct 7, 2019

I already moved from this project, but still, thank you for the good work!

@fgilio
Copy link

fgilio commented Nov 20, 2019

Hi @LinusU! Any idea on when this is going to be released? I'm experiencing this exact issue

@LinusU
Copy link
Collaborator

LinusU commented Nov 21, 2019

Hmm, @chearon it seems like the 1.6.1 tag is created but is without assets, do you know what the status is on that one? ❤️

@chearon
Copy link
Collaborator

chearon commented Nov 25, 2019

Oops, I'm running the builds now

@fgilio
Copy link

fgilio commented Nov 25, 2019

Thanks!

@fgilio
Copy link

fgilio commented Dec 8, 2019

Hey guys, are those builds available somewhere?

@fgilio
Copy link

fgilio commented Dec 13, 2019

@chearon sorry to bother, are those builds available somewhere?

@chearon
Copy link
Collaborator

chearon commented Dec 13, 2019

@fgilio yes! I uploaded them last time I commented, try npm install canvas@2.6.1
@LinusU might be time to promote 2.6.1 to latest!

@fgilio
Copy link

fgilio commented Dec 13, 2019

Seems to be working fine and fixes the issue I was having, thanks a lot!

@LinusU
Copy link
Collaborator

LinusU commented Dec 14, 2019

Promoted 2.6.1 to latest 🎉 :shipit:

@fgilio
Copy link

fgilio commented Dec 15, 2019

Thanks!

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

Successfully merging a pull request may close this issue.