-
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
gatsby develop is not working after npm install #6834
Comments
@muhammad-ammar My hunch is that you may have unsatisfied peer dependencies, could you try running Are there any specific warnings given when running |
@johnaoss sorry, I missed the output of |
👍 No worries! Looks like the problem is that your package.json most likely relies on gatsby-plugin-typography v1.7.19 instead of the 2.0 releases. For now, you can solve it by replacing |
@johnaoss |
Hi, @muhammad-ammar did you fix it with |
Hi @Chuloo, I switched to But this is not good as I still don't know why the |
This could be due to a mix of using Gatsby v2 with Gatsby v1 plugins. If that's the case, we should probably update the docs to make it clear how and when to install v2 plugins. |
Good to note that using this starter |
Failed with the same error as before on next and master however Before I install the plugin, my important gatsby info looks like this:
After installing:
After uninstalling using
It's also worth noting that |
I think the problem here is that initial starter setup is done with It's also very interesting stuff that @johnaoss pointed out - just running |
I had a lot of similar issues recently and also found that running yarn as the package manager would sort most of this out - but it didn't solve the actually issue everyone is talking about. The problem many of you are having is that you are installing the V2 starters but not V2 plugins or Gatsby V2 which then causes these issues (I know this as I have installed everything more times than I can count in the last 3 days). For example you need to make sure when you install For me this could be fixed by updating the docs to specify that you need to use the |
We do cover this in the migration guide: https://next.gatsbyjs.org/docs/migrating-from-v1-to-v2/#update-gatsby-related-packages |
@KyleAMathews sorry I missed that in the docs Kyle. That makes more sense but I didn't even look at the migrating guide, I just started with the V2 docs tutorial and that's where the confusion comes from as there is not mention of the |
Is installing gatsby-cli@next required? |
And now I am facing #5774 After trying lots of this and that, I realised that the best option is to stick with |
Just ran into the same issue working on Gatsby v2. Why can't this be fixed? |
I'm in the same boat, keep getting errors "Can't resolve 'gatsby-link" when trying to start up hello world tutorials. Really keen to look into it, but am struggling to get it of the ground. Surely the starting point should be solid. I've spent over a day trying to track down why. Should Gatsby v1 be used instead? |
Hey @transf3r could you open a new issue describing the problems you're seeing? If you can follow the issue template (in particular running We put a ton of work into trying to make the tutorial work smoothly for as many people as possible, so I'd love to figure out if there's a problem we've missed. @ericsolberg similarly could you open a new issue if you're still seeing this problem? I was able to run the steps you listed without errors. |
Hello, Why the hell is it so complicated to get things working ? 100% agree with @ericsolberg... |
Please provide the full output. |
It's from à Docker container, the host is Windows 10 Pro 64bits Dockerfile :
docker-compose.yml :
I completely broke my setup after the command from the docker instance :
Output :
The server cannot be started anymore after that :
And npm install command fails ... If the npx command for the initial setup worked, there should be a solution to restore the site in a working state, isn't it ? |
Regarding the libc issue, please open a new issue at lovell/sharp:
Please do install Python 2 on the container and run This is a node-gyp issue. So this is not an issue caused by Gatsby but missing (system) dependencies. |
This is because the node-gyp step failed due to the missing Python 2. |
https://github.com/lovell/sharp/search?q=detect-libc+is%3Aissue&type=Issues Try |
The latest command gave output :
|
Well you might want to install it then ;-) Every project has its own issue tracker and they contain the answers. |
I did that and the next issue with a missing module 'detect-libc' ... After spending the afternoon on this issue, I (randomly) tried to build using The typography package installation worked with yarn while it has been a nightmare with npm. This is a good news but also a bad, because I have a new build system to learn with yarn. I'd advise to update this page of the tutorial : Thanks you @DanielRuf for the help :-) |
This is still an issue with sharp / libvips and not Gatsy itself. Yarn resolves the dependencies differently than npm does, especially if there are lockfiles. Yarn is not much different but better in many parts. |
Anyone who has stumbled up upon this issue DO NOT USE |
Well, there are cases where Yarn is better (and this and other ones are just an example why we have switched to Yarn for all projects). Not sure what the exact issue in npm is. So far I see no linked issue. |
Thank you man, works for me! :) |
For me the issue was that i was mixing yarn and npm.
That solved it for me !!! |
Is the solution to this really to switch from |
I'm on a Windows 10 PC running a Laravel Homestead Vagrant Ubuntu VM, where I've been installing the tutorial. (So I also had to map port 8000 to 8000 in Homestead.yaml.) I'm trying to learn Gatsby. I skipped to https://www.gatsbyjs.org/tutorial/part-four/#data-in-gatsby (but then went back to parts 1-3 and had similar problems). It's surprising that the tutorials don't work, as people have said above. Finally, after finding this issue/ticket, I was able to get things working by using
I now am able to see pandas at http://localhost:8000/ I think someone should update the docs to prevent new people wanting to learn Gatsby from wasting a lot of time being frustrated not even getting the tutorial to load. But overall, thanks for the very good looking tutorial and a framework that looks very promising. |
For those who were already using |
Ran into the same problem, could manage by installing first:
then:
|
Reinstating the package.lock file and running |
in my case I started installing with yarn and that's why I had the error to be able to install it I did it like this: yarn add install gatsby-plugin-typography react-typography typography I hope someone finds it useful |
Description
I was following tutorial at https://next.gatsbyjs.org/tutorial/part-two/#gatsby-plugins but
gatsby develop
is not working as expected after the belownpm install
commandgatsby develop
command work as expected before the above command.I am getting the below error when I run
gatsby develop
commandOutput of the
npm install --save gatsby-plugin-typography react-typography typography
Steps to reproduce
gatsby new tutorial-part-two https://github.com/gatsbyjs/gatsby-starter-hello-world#v2
cd tutorial-part-two
npm install --save gatsby-plugin-typography react-typography typography
gatsby develop
Expected result
gatsby should start the built-in development server
Actual result
Environment
File contents (if changed)
gatsby-config.js
:package.json
:gatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AThe text was updated successfully, but these errors were encountered: