-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Error: Cannot find module 'gatsby-cli/lib/reporter' #14875
Comments
This is very weird. If we look at gatsby-cli@2.6.9, we can see that that file exists like we'd expect: https://unpkg.com/gatsby-cli@2.6.9/lib/reporter/index.js Not an ideal solution, but I'd guess that using the local version of the Gatsby CLI, e.g. something like (in package.json): {
"scripts": {
"build": "gatsby build"
}
} and then My initial thinking is that #14220 may contain a breaking change we'll need to iron out. |
Having exactly the same issue! Can confirm that it can be reproduced with node 8.10.0. Works fine with >8.11.0 |
Indeed, pinning at 2.6.8 locally seems to sort of work for now if I use
|
(I can't tell if these are related to my app or related to something within Gatsby. I'm inclined to believe it's related to Gatsby given that these were not issues in previous versions.) |
Encountered this issue, too. Using Node 10.15.0 |
When I install gatsby-cli locally (npm install --save gatsby-cli), and run gatsby develop, I encounter this error: `Error Warning: Can't perform a React state update on an unmounted error UNHANDLED REJECTION TypeError: Cannot read property 'type' of undefined
|
Oh my, I'll have a look. |
Same error here with node v9.11.2 |
I'm seeing the same issue. Attempting to bump the following dependencies in my project:
Both are failing my CI tests with:
Build logs here:
The change log for |
I tried different versions of node by setting |
Seeing this issue too. As others have mentioned I'm able to get round this for the moment by installing the latest gatsby-cli package locally (2.6.9)
|
Been pulling my hair out suddenly cant develop on my gatsby project. I've tried installing many different versions of node / npm all with the same error |
Strange. The main project I'm working on is unaffected... but, if I try a fresh default project or "wordpress-tutorial-site", I can't even "gatsby develop" those. I had just ran "npm i gatsby-cli" not too long ago. |
Because it probably uses the lockfile which uses an older release. |
If y'all delete your lock files and reinstall, does that help? |
Negative |
@KyleAMathews same issue still. Ran:
|
Hi, I'm using Gatsby for the first time today. I followed the Quick Start docs and got up to the point where I run Using Gatsby v2.6.9 and tried with both Node v10.15.3 and v8.5.0. |
|
@MitchellCash I've been using your reproduction to test this. To Reproduce(I'm using Node 11 and NPM 6.7.0; may matter)
InfoWhat I'm seeing currently:
I'd imagine other people can confirm this as well. While I investigate further, this should be able to be fixed now with a temporary band-aid: npm install gatsby-cli --save-dev This will ensure the dependency makes its way into your node_modules tree. This shouldn't be necessary, so please treat this as temporary. |
@DanielRuf reproduced locally with @DSchau thanks for reproducing and providing a temporary fix! |
If i npm install gatsby-cli locally i get into another issue :
|
Seems like a similar issue - I recently updated Gatsby to latest version and my Netlify deploy is hanging at |
This is caused by 967597c
Because of This error doesn't occur for It works after |
@zappys - I'm getting same error after running The output is: |
@MunifTanjim he is aware of it, see #14875 (comment) |
I am also getting this after adding gatsby-cli |
Hi, I try gatsby today firs time, and has the same issuse, I am created gatsby-site run
When I asked google about my problem and he give me an solution |
As an immediate workaround you can use |
@polkhovsky , thanks, this works for me |
I get a different error when running
|
@doodybrains that seems something else, could you create another issue for this. I think I fixed the issue with NPM. I would love if people can test it out for me. I've updated a lot of packages so please install the correct packages. For example if you have I published some versions to test, please install the ones that are in your package.json |
+1 for @polkhovsky 's workaround |
@wardpeet I tried with NPM, I ran these commands: And I got this error:
|
And anyway, requiring to use I'm having all this on node 12.4.0 / npm 6.9.0, just trying to set up a demo for a doc purpose. Thanks to @MunifTanjim above for tieing this down for causes! Maybe we could get #14800 repaired also, to stop similar new trying user befuddlement?? Thanks |
@wardpeet thank you. i npm installed for after running
tried running
but that returned an error. |
@wardpeet sorry. i removed |
@jkaracozoff that seems a different bug, any reproduction you can create for me? Feel free to send me a private email ward@gatsbyjs.com |
@narration-sd it's getting a bit late for me, I'll try to get to it this week. |
@wardpeet Thanks, friend -- fully understand about the 'getting late' part, just did that in the other timezone direction as often, last night... |
UPDATE: NPM appears to be working now, don't forget to install ALL the packages you need (he said to himself...), thanks @wardpeet !
|
Following @wardpeet 's instructions and installing the necessary @reporter-npm packages works. For me, it was the following: Thank you! |
we rolled back the change for now so the latest npm packages shouldn't have this issue. We'll reiterate on the reporter-npm fix and ship it somewhere this week. Thanks for sticking with us and helping us debug this issue! ❤️ Sorry for the inconveniences it may have caused.
|
@wardpeet thanks for the quick responses! I bumped my dependencies to the latest and we are all good again! I also tested the two in development dependencies and they also solved this problem for me:
|
Just to add for others: you do apparently need to add the two @reporter-related libraries, after getting npm to actually install and use the back-versioned gatsby-cli (by npm -g remove gatsby-cli, locally also if you have one there). The library adds, as close above from @benryerson, done in the created new site:
With these, it works, and thanks again @wardpeet @MunifTanjim |
@MitchellCash Mitchell, I'm trying to understand what exactly you meant about having success by 'bump[ing] dependencies' I've got the fixed gatsby-cli of today to work in creating a buildable site, but only by fresh To discover your meaning, I tried several variations on removing node_modules and package-lock.json, then npm install. As far as I know, this kind of trash-restore is the only way to get npm to prefer currently 'updated' dependencies, other than some obscure scripting plugins. My unsuccessful variations meant doing Or did you mean manually changing all the versions in the list above from @wardpeet in the package.json, then [added] And no, that didn't work either. I continue to get the error You guys will have to forgive a little. I've just come off a tug of war with npm over updates to .beta-n plugins, which in fact it won't do. You have to go manual or remove-add there. That's the kind of iron rule I'm looking to understand here. |
@narration-sd what I meant was the following versions worked for me:
The following (the cause of this whole issue thread) did not work for me:
If you are still having issues you might want to wait for the Gatsby dependencies in https://github.com/gatsbyjs/gatsby-starter-default/blob/master/package.json to be bumped to the latest versions as they are still pointing to the broken versions (as of the time I write this). Once that is done you will be able to run |
we just published a new version, i'll be bumping our starters in a few minutes. |
@MitchellCash Thanks for the clarification, Mitchell. What you say is exactly what I arrived at. |
Description
When trying to do
gatsby build
, I'm noticing that my custom source plugins as well as Gatsby packages are trying to findgatsby-cli/lib/reporter
, so every build fails with something that looks like this:Environment
I've tried a few different versions of gatsby, gatsby-cli, and where gatsby-cli lives, but this is one example:
The text was updated successfully, but these errors were encountered: