gridsome: Error running 'gridsome develop' on fresh project; Error: stderr is null

Description

Tried to run develop on a newly created project. Fails after Bootstrap step.

Steps to reproduce

> gridsome create hello-gridsome
> cd hello-gridsome
> gridsome develop

Console output

Gridsome v0.5.4

Initialize - 0.18s
Load sources - 0.04s
Create GraphQL schema - 0.04sSet up routes - 0s
Generate code - 0.04s
Bootstrap finish - 0.31s
Error: stderr is null - this should never happen. Please open up an issue at https://github.com/facebook/jest
    at ChildProcessWorker.getStderr (/Users/williamjustice/workspace/gridsome-test/node_modules/jest-worker/build/workers/ChildProcessWorker.js:222:13)
    at new BaseWorkerPool (/Users/williamjustice/workspace/gridsome-test/node_modules/jest-worker/build/base/BaseWorkerPool.js:69:35)
    at new WorkerPool (/Users/williamjustice/workspace/gridsome-test/node_modules/jest-worker/build/WorkerPool.js:31:1)
    at new JestWorker (/Users/williamjustice/workspace/gridsome-test/node_modules/jest-worker/build/index.js:123:26)
    at createWorker (/Users/williamjustice/workspace/gridsome-test/node_modules/gridsome/lib/workers/index.js:9:10)
    at module.exports (/Users/williamjustice/workspace/gridsome-test/node_modules/gridsome/lib/server/middlewares/assets.js:8:18)
    at module.exports (/Users/williamjustice/workspace/gridsome-test/node_modules/gridsome/lib/server/createExpressServer.js:59:55)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Environment


- gridsome version: 0.5.4
- @gridsome/cli version: 0.0.8

- Node version: 10.13.0
- Platform: Mac

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 15
  • Comments: 24 (6 by maintainers)

Commits related to this issue

Most upvoted comments

jest-worker@24.3.0 was published just before this issue was created. I’ll see if we can do something in Gridsome to fix this. A temporary solution is to use a previous version by adding this to package.json if you use Yarn:

{
  "resolutions": {
    "gridsome/jest-worker": "24.0.0"
  }
}

I published a new version of Gridsome (0.5.5) with a pinned jest-worker version that works.

Folks, note that this is being fixed in Jest, a PR was just opened: https://github.com/facebook/jest/pull/8083. Thanks @willdante and @hjvedvik for reporting it there 👍

For those using NPM: npm install jest-worker@24.0.0 --save

Edit: added --save, sorry, I should have included that initially.

@willdante Please use npm install jest-worker@24.0.0 --save The issue is solved with the command.

Especially for the beginners: Don’t forget to remove the dependency to the explicit patch level again after the fix has been released, so you are not stuck with the old version. Otherwise you might run into other problems later on.

Just remove the line from package.json or use the same command, but with uninstall instead of install.

@willdante they haven’t tagged a release yet so you’re still using v24.3.1 which had the bug 😃

I’ve tried npm install jest-worker@24.0.0 as I’ve had installed Gridsome CLI with NPM and it didn’t work.

Then I’ve uninstalled Gridsome CLI with NPM and installed it with Yarn to try to add "resolutions": { "gridsome/jest-worker": "24.0.0" } to my package.json but it didn’t work better.

I’m not a dev and definitely a beginner so what am I doing wrong here ?