nodejs / nodejs/nan

Electron-rebuild canvas fails with nan 2.14.1, works with 2.14.0

Open
#892 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.4k
Forks
531
Avg merge
21m
Merged PRs (30d)
1

Description

Hey, I had trouble trying to figure out why running

npx electron-rebuild canvas

Failed with the following error on Windows 10 x64:

Canvas.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::BackingStore> __cdecl v8::ArrayBuffer::GetBackingStore(void)

I reported the issue to to the node-canvas repository here: https://github.com/Automattic/node-canvas/issues/1589

With more detail about the issue.
Somebody figured out nan 2.14.1 was the culprit, downgrading manually to nan 2.14.0 with

npm install nan@2.14.0

Fixed the compilation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing npx electron-rebuild canvas on Windows 10 x64 with nan 2.14.1, then compare it with the reported nan 2.14.0 workaround and the node-canvas issue linked in the report. Done means the Electron canvas compilation no longer produces the unresolved v8::ArrayBuffer::GetBackingStore symbol with nan 2.14.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, electron, node.js
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.