Gatsby fails out of the box following the instructions here: https://www.gatsbyjs.org/docs/
npm install --global gatsby-cli
gatsby new gatsby-site
cd gatsby-site
gatsby build
gatsby serve
site should be accessible at http://localhost:9000
gatsby serve generates the following error and site is not accessible at http://localhost:9000:
{ Error: Command failed: xsel --clipboard --input
xsel: Can't open display: (null)
: Inappropriate ioctl for device
at Promise.all.then.arr (/home/hansifer/sites/blog/node_modules/clipboardy/node_modules/execa/index.js:236:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
code: 1,
killed: false,
stdout: '',
stderr: 'xsel: Can\'t open display: (null)\n: Inappropriate ioctl for device\n',
failed: true,
signal: null,
cmd: 'xsel --clipboard --input',
timedOut: false }
npm list gatsby): 1.9.250gatsby --version): 1.1.50gatsby-config.js: not changed
package.json: not changed
gatsby-node.js: not changed
gatsby-browser.js: not changed
gatsby-ssr.js: not changed
gatsby serve is a small wrapper around serve.
Can you replicate this issue using just serve?
This should do it:
node_modules/.bin/serve -p 9000 ./public
Does that give the same error?
You could also try installing a newer version of serve to see if that does the same thing. Gatsby is on ^6.4.0 at the moment, and the latest is 6.5.6.
Hi, thanks for responding.
Yes, I get the same error when running serve directly.
node_modules/serve/package.json shows version 6.5.6
also: when I do npm list gatsby to get the version I get:
[email protected] /home/hansifer/sites/gatsby-site
└── UNMET DEPENDENCY [email protected]
npm ERR! missing: [email protected], required by [email protected]
also, I have since upgraded gatsby-cli to v1.1.51
I think that it's a Serve problem because I'm getting the same error when trying to run serve -s build in a Create React App project.
I'm using Node 10.0.0 and Ubuntu 16
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!
Most helpful comment
I think that it's a Serve problem because I'm getting the same error when trying to run
serve -s buildin a Create React App project.I'm using Node 10.0.0 and Ubuntu 16