-
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 command error #3183
Comments
Hi @MaralS are you up to date? If not can you try with Gatsby 1.9.131 and gatsby-cli 1.1.27 Run Or Then if it is still showing errors try manually updating Gatsby version in your Think when this is merged this should go away |
@MaralS you will also need to
|
I'm using Yarn now, and everything work. Thanks 👍 |
This is still broken for me. I'd prefer not to use yarn. Following the get started instructions doesn't work. (https://www.gatsbyjs.org/docs/)
|
@AtHeartEngineer is faster than npm, you should at least try :) |
This problem still persists today following the exact steps as listed on the Gatsby website, tried both NPM and Yarn.
|
@reramjiawan What version of |
OS: Windows 10 64-bit Followed the exact steps on the Gatsby website, installed the Gatsby CLI and then ran the commands as shown.
|
Does anyone have this error on OS other than Windows? |
With some help of @KyleAMathews on Discord we tracked the problem down to being to the glob failing, which means the layout object isn't created.
|
The problem is solved! It is related to being a permission issue on Windows Machines. Installing Gatsby on a other drive or folder which does not need permission so NOT Program Files will solve the problem! |
@reramjiawan Looks like |
@szimek hmm that could be it Both node-glob and chokidar are failing to find the layout component file gatsby/packages/gatsby/src/internal-plugins/component-layout-creator/gatsby-node.js Line 29 in 0a1e42c
|
While it sucks a bit, if it's really caused by this permissions issue, maybe Gatsby could check file permissions when creating a new app and report an error/warning if they are incorrect (whatever it actually means) and could break |
@szimek I've just experienced this same issue on macOS, so it doesn't seem to be limited to Windows. Is there a particular file or directory that needs a specific set of permissions to work-around this? |
@KyleAMathews I'm not really sure what this line gatsby/packages/gatsby/src/internal-plugins/component-layout-creator/gatsby-node.js Line 29 in 0a1e42c
is supposed to be doing. The path gets evaluated to something like
that doesn't find anything, because gatsby/packages/gatsby/src/internal-plugins/component-layout-creator/gatsby-node.js Line 34 in 0a1e42c
This gets evaluated to
which, in my case, returns Though I don't think it causes the issue mentioned in this thread :/ |
I've just encountered the same error, but it was my mistake. When calling So it looks like there are 2 similar issues:
The first issue could be solved by throwing an error if a layout can't be found in pages-writer.js#L45-L49 and then catching rejected promise in https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/bootstrap/index.js#L360 I can create a PR for that, but I'm not sure though if error reporting is done simply using The second issue could be solved by adding some check after generating new Gatsby project to see if at least the default |
@szimek Anything would be better than current, I'm having this issue on macOS and trying to debug the vague error messages. This seems gatsby-plugin-i18n related for me as well. I changed { useLangKeyLayout: false } in gatsby-config.js for now, which seems to work. |
instead of this:
It still doesn't fix the issue that Gatsby sometimes can't find layout files on Windows though :/ |
Hmmm... boo :-( |
I first checked that one but my problem wasn't resolved by that. Maybe that helps! :) |
@LekoArts Which version of Gatsby are you using? |
@szimek 1.9.178 |
@LekoArts Thanks. This version already includes my fix for permissions issue on Windows e.g. when you create your app in EDIT: I created a Gatsby app in |
I don't know why I'm still having this issue for a new project. It's exhausting ! |
@MaralS Hey, I've got a few questions:
It looks like in your case it's caused by a different issue than the missing layouts. I'm guessing it's caused by a |
@szimek, yes this is the same error :/
I did not modify the original layouts, I just installed the packages, gatsby plugins.
|
@szimek it seems like it's a problem related to Windows. It works fine on my mac but I really need to fix this bug on Windows :( |
@MaralS Yeah, it's probably something similar to the layout issue, where the glob pattern was working on Mac and Linux, but not on Windows. I'll try to find some time till the end of this week to set up Windows VM again and see if I can reproduce this error. |
@MaralS Which Gatsby starter are you using? I just created a new app using the default one and it works fine. I see that you got many more gatsby-* packages than I have:
Here are version I'm using:
|
@szimek |
@szimek I tried to delete the repo and clone it again. It doesn't work.
When I'm on Any idea @KyleAMathews ? |
I tried to do yarn upgrade-interactive
I'm stuck with this issue for weeks and any help will be appreciated. Have a nice day |
What versions of Node & Yarn are you on? |
@KyleAMathews |
Hmmm something is really screwy there. All the slashes between the path names are being removed somehow. I haven't seen that before :-( What's your package.json look like? |
Yes I agree, and I really don't know why.
I just added more plugin in order to have a ready-to-use repo for my future projects. It works fine on mac but I'm a windows user |
Maybe related to this one: |
@LekoArts How can I fix the issue ? I upgraded all the packages, including Gatsby |
@MaralS did you upgrade gatsby-cli? First try this part from earlier #3183 (comment)
Then, if that still does not help, first delete any/all
Works in Bash Unix shell for this and is something I use frequently when testing. Do you have WSL (FAQ)? If so you could use that Bash command above, otherwise the check out the equivalent PowerShell docs on Remove-Item if you are already using PowerShell. You may also try removing any After all that, if you are still stuck, maybe try a fresh clone of your favorite Gatsby starter repo or go step by step adding packages back from That would be super helpful, especially if you report back here what worked, if anything, or did not...@ mention me if you want and I will help you keep debugging. |
@rdela I literally tried everything. I think It's due to of the number of package, I want to understand whick package causes this issue. I will clone again the gatsby starter default and install step by step all the packages and test. I will notice you when I'll find out ! It's frustrating because on Mac OS I have no issues...but I'm essentially on Windows so...that's a big problem :/ |
@rdela I tried to clone again the gatsby starter repo and run the command yarn develop but I still have the same error 😢😢😢 |
Ran into this issue today while hosting a workshop for local students. On Windows, if the project is under a path that has non-[a-zA-Z0-9] letters (in our case, the letter 'ä'), this problem occurs. |
Thanks for describing your encounter with this error @anttti! @MaralS does this hold true for your case? From your earlier error:
Looks like If it does work, hoping this is a temporary fix and we can get Gatsby working on any path that should work on Windows soon. |
@rdela It finally works, thanks a lot !!!!!!!! |
Ehmmm, yeah... |
@LekoArts yes indeed, my bad sorry ! |
This same issue is occurring for me, and it doesn't seem dependent on special characters. As soon as I run "npm install --save gatsby-plugin-typography react-typography typography" on the tutorial on windows then run "gatsby develop" I get the same error:
|
@Ryan8765 i've ran the tutorial and confirm that the issue exists. |
Hi everyone,
I just created a new Gatsby project for a client.
I just ran these following commands
gatsby new mynewproject
cd mynewproject
gatsby develop
Until here, nothing wrong. But when i'm on localhost:8000 I have this error message :
I tried several time to delete the folder and reinstall Gatsby but I can't fix this issue.
fireshot capture 3 - - http___localhost_8000_
What can I do in order to solve this issue ??
Thank in advance for your help.
Have a great day.
Maral
The text was updated successfully, but these errors were encountered: