When people install gatsby with --no-optional gatsby breaks because ink is not being installed. We made ink optional because of node 6 #14233
We should fix our check here
https://github.com/gatsbyjs/gatsby/blob/6070279f68aab0c82f2d244f54088f8ad4a74503/packages/gatsby-cli/src/reporter/reporters/index.js#L4-L8
let inkExists;
try {
require.resolve('ink')
inkExists = true
} catch(err) {}
if (inkExists && !isCI) {
open a gatsby project and run
npm install --no-optional
npm run build build
Gatsby should build the website.
> [email protected] build C:\Users\WardPeeters\projectswin\tmp\gatsby\my-default-starter
> gatsby build
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'ink'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (C:\Users\WardPeeters\projectswin\tmp\gatsby\my-default-starter\node_modules\gatsby\node_modules\gatsby-cli\lib\reporter\reporters\ink\index.js:10:12)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Copied from https://github.com/gatsbyjs/gatsby/pull/14233#issuecomment-495895945
I can hop on this!
Awesome! thanks, @ryandrew14 just shout if you need any assistance.
[email protected] and [email protected] were published
Most helpful comment
I can hop on this!