jimp-dev / jimp-dev/jimp

jimp.read is failing silently in a grunt task

Open
#852 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
14.7k
Forks
777
PR merge metrics
No merged PRs in 30d

Description

# Expected Behavior

When you call `jimp.read`, then `jimp.read.then` or `jimp.read.catch` are called.

# Current Behavior

If `jimp.read` is called in a grunt task, then neither `jimp.read.then` or `jimp.read.catch` are called. If you call `jimp.read` in the node repl or in a node script, it works normally.

```
$ node
Welcome to Node.js v13.7.0.
Type ".help" for more information.
> var test = require( './test' );
undefined
> test();
attempting resize
running resize task
Promise { undefined }
> jimp.read success
image processing success!
received buffer, great news!

>
(To exit, press ^C again or ^D or type .exit)
>
$ grunt test
Running "test" task
Resizing
attempting resize
running resize task

Done.
$
```

# Failure Information (for bugs)

See above.

## Steps to Reproduce

$ git clone https://github.com/mattpen/jimp-grunt-test.git
$ cd jimp-grunt-test
$ npm install
$ grunt test

**Screenshots**

N/A, either an image is generated or it isn't.

## Context

- Jimp Version: 0.9.5
- Operating System: MacOS 10.14.6
- Node version: 13.7.0

## Failure Logs

No log output was produced by jimp.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with the linked mattpen/jimp-grunt-test project using Node.js 13.7.0, Jimp 0.9.5, and `grunt test`, then compare it with the Node REPL or script behavior described here. Done means the `jimp.read` promise settles during the Grunt task and the expected image output or failure is observable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
tooling
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.