Gatsby: [v2] `gatsby develop` not working

Created on 13 Jul 2018  路  7Comments  路  Source: gatsbyjs/gatsby

Description

gatsby develop stops at the step info bootstrap finished. Everything worked fine before I did npm update on all packages. This is what changed:

Package                                Current         Wanted   Latest  Location
eslint                                  4.19.1         4.19.1    5.1.0  vo-website-2
gatsby                           2.0.0-beta.21  2.0.0-beta.32  1.9.273  vo-website-2
gatsby-plugin-feed                2.0.0-beta.3   2.0.0-beta.3   1.3.25  vo-website-2
gatsby-plugin-google-analytics    2.0.0-beta.2   2.0.0-beta.2   1.0.31  vo-website-2
gatsby-plugin-offline             2.0.0-beta.3   2.0.0-beta.3   1.0.18  vo-website-2
gatsby-plugin-react-helmet        3.0.0-beta.3   3.0.0-beta.3   2.0.11  vo-website-2
gatsby-plugin-sharp               2.0.0-beta.3   2.0.0-beta.5   1.6.48  vo-website-2
gatsby-remark-copy-linked-files   2.0.0-beta.2   2.0.0-beta.2   1.5.37  vo-website-2
gatsby-remark-images              2.0.1-beta.4   2.0.1-beta.6   1.5.67  vo-website-2
gatsby-remark-prismjs             3.0.0-beta.3   3.0.0-beta.3    2.0.4  vo-website-2
gatsby-remark-responsive-iframe   2.0.0-beta.2   2.0.0-beta.2   1.4.20  vo-website-2
gatsby-remark-smartypants         2.0.0-beta.2   2.0.0-beta.2   1.4.12  vo-website-2
gatsby-source-filesystem          2.0.1-beta.3   2.0.1-beta.3   1.5.39  vo-website-2
gatsby-transformer-remark         2.1.1-beta.2   2.1.1-beta.3   1.7.44  vo-website-2
gatsby-transformer-sharp          2.1.1-beta.3   2.1.1-beta.3   1.6.27  vo-website-2

Steps to reproduce

It happens at my personal repo, after I updated to beta 32. I was not able to reproduce in another repo. The starter default crashes in another interesting way at the same step:

info bootstrap finished - 5.237 s

error The "id" argument must be of type string. Received type object


  Error: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type ob  ject

  - loader.js:644 Module.require
    internal/modules/cjs/loader.js:644:11

I am not sure if those two problems are related or entirely different. I just checked out the repo, npm i & npm run develop.

Environment

My repo:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.5.0 - ~/.nvm/versions/node/v10.5.0/bin/node
    npm: 6.1.0 - ~/.nvm/versions/node/v10.5.0/bin/npm
  Browsers:
    Chrome: 67.0.3396.99
    Firefox: 61.0.1
    Safari: 11.1.2
  npmPackages:
    gatsby: next => 2.0.0-beta.32 
    gatsby-plugin-feed: next => 2.0.0-beta.3 
    gatsby-plugin-google-analytics: next => 2.0.0-beta.2 
    gatsby-plugin-offline: next => 2.0.0-beta.3 
    gatsby-plugin-react-helmet: next => 3.0.0-beta.3 
    gatsby-plugin-sharp: next => 2.0.0-beta.5 
    gatsby-remark-copy-linked-files: next => 2.0.0-beta.2 
    gatsby-remark-images: next => 2.0.1-beta.6 
    gatsby-remark-prismjs: next => 3.0.0-beta.3 
    gatsby-remark-responsive-iframe: next => 2.0.0-beta.2 
    gatsby-remark-smartypants: next => 2.0.0-beta.2 
    gatsby-source-filesystem: next => 2.0.1-beta.3 
    gatsby-transformer-remark: next => 2.1.1-beta.3 
    gatsby-transformer-sharp: next => 2.1.1-beta.3 
  npmGlobalPackages:
    gatsby-cli: 1.1.58

Because it also happens with the starter, here is the environment of the starter:

  [... same as above]
  npmPackages:
    gatsby: next => 2.0.0-beta.32 
    gatsby-plugin-react-helmet: next => 3.0.0-beta.3 
  npmGlobalPackages:
    gatsby-cli: 1.1.58

File contents (if changed)

Repos to test:

https://github.com/timurc/vo-website-2/tree/gatsby-develop-issue
https://github.com/gatsbyjs/gatsby-starter-default/tree/v2

Most helpful comment

I have the same problem using _gatsby-starter-default#v2_ and made a temporary workaround by setting gatsby to 2.0.0-beta.29 in the package.json, then npm install.

All 7 comments

I have the same problem using _gatsby-starter-default#v2_ and made a temporary workaround by setting gatsby to 2.0.0-beta.29 in the package.json, then npm install.

A fix for this is merged on master but I can't publish it due to npm 2fa issues. I don't have any more time to look into this today so handing over to @pieh or @KyleAMathews.

is there a way to see if gatsby develop works with the default project can be checked with an integration test? are you interested in having a test for this?

Published the fix so we're good now.

@mraerino definitely! Though... I thought we did have a test for develop... https://github.com/gatsbyjs/gatsby/blob/462df39d96bc51e36d955e827ba1df7691a27e3d/.travis.yml#L30

Either that somehow still worked or it's failure doesn't block merging?

Fix is published, so we can close this issue

I got this today after creating a new gatsby-starter-blog. Tried deleted the node_modules folder and did npm install.

also solved this today by deleting node_modules and yarn files and doing npm install and brew yarn install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimfilippou picture jimfilippou  路  3Comments

benstr picture benstr  路  3Comments

rossPatton picture rossPatton  路  3Comments

hobochild picture hobochild  路  3Comments

brandonmp picture brandonmp  路  3Comments