Automattic / Automattic/node-canvas

Unable to use Canvas on windows server 2008 R2 with node 10.15

Open
#1,351 13 comments 1 reaction 0 assignees View on GitHub
Bug Build
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Hi All,

I'm new to node, and I'm trying to use canvas (not to compile, just to use it) and I'm not able to. I'm clearly doing something wrong, and I appreciate some help.

## Issue or Feature

Unable to install canvas properly with
```
npm i canvas
```

## Steps to Reproduce

1. Installed on a blank windows 2008 R2 **node 10.15.0**

1. installed canvas with the command ```npm i canvas```
1. in the same folder where canvas is installed, created the file test.js containing the 'Quick Example' in the [npm page](https://www.npmjs.com/package/canvas).
1. ran the example using
```
node test.js
```
and got the following error :

```js
C:\Users\Administrator>node test.js
internal/modules/cjs/loader.js:718
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The specified module could not be found.
\\?\C:\Users\Administrator\node_modules\canvas\build\Release\canvas.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\Administrator\node_modules\canvas\lib\bindin
gs.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
```

## Your Environment
* Version of node-canvas (output of `npm list canvas` or `yarn list canvas`): **2.3.0**
* Environment (e.g. node 4.2.0 on Mac OS X 10.8): node 10.15.0 running on windows 2008 R2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the reported npm i canvas installation on Node 10.15.0 and Windows Server 2008 R2, then reproduce the Quick Example from test.js and inspect the canvas.node loading error. Done means canvas installs and the example runs successfully in the stated environment, or the issue is documented as unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.