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
install gatsby-transformer-remark breaks 'gatsby develop' #19064
Comments
Looks like you need to install the react and react-dom npm packages |
Strangely the 'gatsby info --clipboard' cmd doesn't list the full package.lock file. Reinstalling react and react-dom doesn't fix this issue. package.json
|
Yes, it started happening in one of my project too. It was working until I updated to the latest version of gatsby and plugins. I am still debugging to see what changed. |
Dangabit! It's happened again. I'm just trying to get started with Gatsby so don't know where to begin... This time I started from the hello-world repo. Error below as soon as I had installed and configured the first change to the gatsby-config.js.
|
Not sure if adding additional insights but a plugin with no errors surfacing upon installation gives me the same "not found" result and did you forget to install message. Also have gatsby 2.1.0 |
Ignore my last comment, the gatsby-theme-legals needs the full name to be resolved in gatsby-config.json. Will take up with package maintainer. |
I upgraded to Catalina and from bash to zsh over the weekend so perhaps that is part of the problem. Though I can see that on my original error it is using bash. It took more than one restart for the OS to upgrade to zsh... I'm not sure if I should edit the question as the issue seems to happen when installing any plugins. Here's the repo of the newer project. https://github.com/CloudBop/gatsby-bootcamp This is the error I get from
|
Hi, this is also happening to me when trying to install the
Don't know what could be happening with plugins maybe? I don't really know |
After a little bit of investigation, I found that the problem started occurring at gatsby@2.16.4. #18752 seems to have introduced the issue. But I will need to investigate a little more to know exactly what's going on. |
I had the same issue a couple of times. Do not get it how it comes but it seems that it is related to some issues in the node_packages. I managed to fix it by doing rm -rf node_packages
npm install |
Had this problem today, required delete of
|
I also had this issue earlier and was able to fix it by deleting my node_modules and re-running npm install. |
This issue may happen if you mix |
+1, and I have a super clean reproduction: I had downloaded an old version of a starter project, and tried updating to a newer version. Nothing fancy, didn't mistakenly use Yarn, and I'm using Linux. |
Occurred for me after upgrading a few gatsby dependencies. Deleting |
It seems to be when updating |
Extending on what my colleague said: I can't reproduce the problem with the given reproduction steps here so this is a system environment issue. We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby! |
Sorry, I know this has been closed... But I still get the same issue. I have had to erase and reinstall my OS this week for unrelated issues so my Catalina OS is completely fresh. I am using NVM so have the latest Node version running. I haven't mixed NPM or Yarn. Just tried with NPM. Still get this issue. Will try rolling back like what The Future 2092 suggests. Update: I didn't roll back to an older version. I just switched to using yarn. Now it seems to compile without any errors, very strange. |
Apologies in advance for the noob rant, but one of the tough things is straddling the npm/yarn divide. There is so much info out there. Yarn seems buttery smooth and trouble free until something like this comes along. Is there any golden rule one should be using as a non-expert? For example, the advice on this problem recommends reinstalling using npm. Then that requires sticking with npm for the foreseeable future? |
Thanks for your valuable time and insights. |
@weisisheng What in most cases helped, no matter if GatsbyJS related or not: Delete lock file, delete node_modules, install again. No matter if using npm or yarn. |
"For example, the advice on this problem recommends reinstalling using npm. Then that requires sticking with npm for the foreseeable future?" NPM never worked for me in this scenario, I'm pretty sure the future hits nail on head as it looks like it gets confused between a Redux Store/Provider and the new Context Hook. I wonder if there are multiple issues with same outcome. Yarn is very similar to NPM but I think it is more reliable regarding semver and dependencies. Which perhaps makes it more versatile for deployment strategy. Though I may well be wrong and this isn't what this thread is about. I am joining the communities LekoArts mentioned and suggest everyone else does as well. I just deleted node_modules and package.lock. Then reinstall with Yarn. FWIW I have found NPM more reliable than Yarn for certain projects in the past. But worth remembering personal cognitive bias is very strong... |
I'm using netlify, and it fails to build it. I don't have control over the process there. Is there any suggestion? |
Fixed on netlify running the option to build clearing the cache. |
Switching to yarn wasn't an option for me. Updating |
This is what fixed it for me: update gatsby and react to the latest version
Remove node_modules and package.json
Install everything from scratch
|
Here to say that after upgrading to |
The same Error has just occurred to me when running the script: |
I think I am having the same issue. Tried on multiple systems.
ERROR The above error occurred in the component: React will try to recreate this component tree from scratch using the error boundary you provided, App. ERROR Warning: App: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI. ERROR UNHANDLED REJECTION Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
Your problem seems related to this: #19827 |
Worked for me |
I had the same issue as people before so i just removed the package.json.lock file, performed npm install, and then gatsby develop and now i can access the site again |
gee willickers, this frightened me! I also had to use npm 11, delete package-lock, |
Works here! thanks |
Save my day! Thanks! |
just fighting it for last 6 hours, and my finding is use yarn right from the binging for package installation. only #yarn is real. |
Hi guys i have the same problem a lot. |
This worked for me, thank you. |
Same problem happened to me as soon as I installed |
Just ran into this issue while trying to install gatsby-plugin-sass. To fix, I removed package.json lockfile and yarn installed. Everything worked for me. |
Additional information: Using yarn instead of NPM can work well. |
i use yarn and removed
i'm not sure i can downgrade them because ohter dependencies are relies on these versions :( |
@trkohler try If this won't help, open a new issue. This one is closed for a while and we would need more information about your error messages to help you |
When I install gatsby-transformer-remark it breaks the development environment for that site. Tried this 3 times from a fresh install using npm.
1 - Install new gatsby site.
2 - Install gatsby-transformer-remark
Initial Error
Tried reinstalling package via npm i
System:
OS: macOS 10.15
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.0/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 77.0.3865.120
Firefox: 70.0
Safari: 13.0.2
npmPackages:
gatsby: ^2.17.4 => 2.17.4
gatsby-image: ^2.2.29 => 2.2.29
gatsby-plugin-manifest: ^2.2.23 => 2.2.23
gatsby-plugin-offline: ^3.0.16 => 3.0.16
gatsby-plugin-react-helmet: ^3.1.13 => 3.1.13
gatsby-plugin-sharp: ^2.2.32 => 2.2.32
gatsby-source-filesystem: ^2.1.33 => 2.1.33
gatsby-transformer-remark: ^2.6.30 => 2.6.30
gatsby-transformer-sharp: ^2.3.0 => 2.3.0
npmGlobalPackages:
gatsby-cli: 2.8.5
The text was updated successfully, but these errors were encountered: