Automattic / Automattic/node-canvas
canvas fails to install when using yarn --modules-folder
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
steps to reproduce
```
yarn add --dev canvas
# this will work
yarn install
# this will fail
yarn --modules-folder cached/node_modules install
```
```
yarn install v1.22.19
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error {HOME}/app/test/cached/node_modules/canvas: Command failed.
Exit code: 127
Command: node-pre-gyp install --fallback-to-build --update-binary
Arguments:
Directory: {HOME}/app/test/cached/node_modules/canvas
Output:
/bin/sh: line 1: node-pre-gyp: command not found
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with Yarn 1.22.19 using the commands and the `cached/node_modules` location shown in the issue. Start by investigating how the `canvas` package invokes `node-pre-gyp` during installation and compare that with a normal `yarn install`. Done means installation succeeds when `--modules-folder` is used, with the relevant install behavior covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100