Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gatsby info not working #8502

Closed
ukch opened this issue Sep 24, 2018 · 10 comments
Closed

gatsby info not working #8502

ukch opened this issue Sep 24, 2018 · 10 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@ukch
Copy link

ukch commented Sep 24, 2018

Description

When I run gatsby info or gatsby info --clipboard, I see an error.

Steps to reproduce

My gatsby config:

require("dotenv").config({
    path: `.env.${process.env.NODE_ENV}`,
});
module.exports = {
    siteMetadata: {
        title: "MY SITE TITLE",
        api: {
            url: process.env.API_URL,
        },
    },
    plugins: [
        "gatsby-plugin-postcss",
        "gatsby-plugin-react-helmet",
    ]
}

Expected result

Gatsby info should be displayed

Actual result

$ gatsby info
error Cannot read property '1' of null


  TypeError: Cannot read property '1' of null
  
  - envinfo.js:1 a.run.then.e
    [lib]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:97255
  
  - util.js:16 tryCatcher
    [lib]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
  
  - promise.js:694 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18
  
  - async.js:138 _drainQueueStep
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:138:12
  
  - async.js:131 _drainQueue
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:131:9
  
  - async.js:147 Async._drainQueues
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:147:5
  
  - async.js:17 Immediate.Async.drainQueues [as _onImmediate]
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14
  

error UNHANDLED REJECTION


  TypeError: Cannot read property '1' of null
  
  - envinfo.js:1 a.run.then.e
    [lib]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:97255
  
  - util.js:16 tryCatcher
    [lib]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10
  
  - promise.js:694 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18
  
  - async.js:138 _drainQueueStep
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:138:12
  
  - async.js:131 _drainQueue
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:131:9
  
  - async.js:147 Async._drainQueues
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:147:5
  
  - async.js:17 Immediate.Async.drainQueues [as _onImmediate]
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14

Environment

For obvious reasons I can't paste the full output of gatsby info, but here are some details:

$ uname -sr
Linux 4.16.0-2-amd64
$ which node
/usr/local/nvm/versions/node/v9.2.1/bin/node
$ node --version
v9.2.1
$ which gatsby
/usr/local/nvm/versions/node/v9.2.1/bin/gatsby
$ gatsby --version
2.4.1
@kakadiadarpan
Copy link
Contributor

@ukch is this your local machine or server?

@kakadiadarpan kakadiadarpan added the status: awaiting author response Additional information has been requested from the author label Sep 26, 2018
@ukch
Copy link
Author

ukch commented Oct 1, 2018

@kakadiadarpan local machine. I use Debian Linux as my development environment.

@nakedible
Copy link
Contributor

nakedible commented Oct 18, 2018

I have this bug as well, and I use Debian Linux

@stefanprobst
Copy link
Contributor

stefanprobst commented Oct 18, 2018

This works fine for me in a Debian stretch VM. What version of Debian are you using?

Edit: I can reproduce on Debian testing.

@stefanprobst
Copy link
Contributor

Tracked this down: This is a bug in the envinfo package which throws when there is no VERSION field in /etc/os-release.

@nakedible
Copy link
Contributor

The bug has already been fixed in envinfo: tabrindle/envinfo#51

@nakedible
Copy link
Contributor

But apparently there is no release yet which includes the fix, as latest 5.10.0 does not.

@thorn0 thorn0 added type: upstream Issues outside of Gatsby's control, caused by dependencies status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. and removed status: awaiting author response Additional information has been requested from the author labels Nov 9, 2018
@thorn0
Copy link
Contributor

thorn0 commented Nov 9, 2018

A new version of envinfo has been released. Currently, the latest one is 5.12.1. gatsby-cli has ^5.8.1 in its dependencies. So it should be enough to update the dependencies (e.g. run npm update) for the issue to go away.

@ukch @nakedible @stefanprobst Can you confirm that it's been fixed?

@gatsbot
Copy link

gatsbot bot commented Jan 30, 2019

Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open!

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jan 30, 2019
@gatsbot
Copy link

gatsbot bot commented Feb 10, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests

5 participants