-
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
Gastby build failing during "Building production JavaScript and CSS bundles" step - "Callback was already called" #27891
Comments
Is |
@sidharthachatterjee Im definitely not using neo-async directly. It looks like it is used in a couple of gatsby packages.
Also our storybook is built separately so we can remove all references to storybook as suspect from the list above as well as Edit: Had another quick look and we use |
I just confirmed that this issue pertains specifically to I think the issue may have something to do with how the CSS is handled in I can confirm that our implementation does import scss directly into our cms.js file which is then handled by I've read some of Here is a snippet of our cms.js file just in case
|
I was able to fix this. Although I never found the exact cause, I believe it has to do with version mismatches between the package versions of babel/webpack loaders that were in my I fixed this by going through the |
@Pearce-Ropion I can confirm that your description is accurate:
@Pearce-Ropion still no luck, which css packages you have? |
Basically this problem occurs due to a mismatch in package versions between the packages required in your package.json and the packages required by by any of the other packages that your project uses. Specifically the packages that are used for building (webpack, sass, etc) I've actually experienced this problem twice now (the second time was about a month after I closed this issue). Here are a few of the things that I found that you should watch out for:
Ultimately, I still believe that the 2 times this happened were separate errors (ie. unrelated errors that attempted to call the same callback fn) but overall, managing the versions of babel/webpack/webpack loaders in order to make them at least resemble the versions used in gatsby and any other build processes you have will fix this issue. Feel free to pm me if you need more help. |
Interesting, especially considering I did not have either storybook, nor was I importing any sass packages aside from the standard |
jus in case, here is my setup: package.json
|
Ok, as of now, I tried removing update: creating a project with gatsby-starter-netlify-cms template fro a scratch and using scss files there gives same problem |
After further investigation I figured that maybe indeed something is off with |
I had this same issue when i cloned the gatsby-starter-netlify-cms and updated the packages (i think the break occured because of To solve the issue i removed the option of plugin
i went with:
This was the plugin module file
This way my build is OK. Also, i'm referencing other issues spread across github which i think are related to this one: #24577 #25466 |
The mere import of these components causes build to fail. Happens when the current gatsby version is built with gatsby-plugin-netlify-cms plugin. See gatsbyjs/gatsby#27891
The mere import of these components causes build to fail. Happens when the current gatsby version is built with gatsby-plugin-netlify-cms plugin. See gatsbyjs/gatsby#27891 Signed-off-by: Gabriel Horacio Cutrini <gabriel.cutrini@gmail.com>
Upgrade major version of gatsby-remark-relative-images from v0.3.0 to v2.0.2. Doing so requires some updates to the gatsby-node.js file to remove a deprecated function. Further, the dev server start process would fail due to a "Callback was already called" error. There doesn't seem to be a clear solution to the issue, but what fixed it in the commit was: * Switching to dart-sass from node-sass * Use gatsby-plugin-netlify-cms v4.9.0 instead of using the latest version v4.10.0. This is a workaround only. References to track this issue are: * gatsbyjs/gatsby#24577 * gatsbyjs/gatsby#27891 * gatsbyjs/gatsby#25142
Hi, I'm running a website that is using a combination of gatsby and netlify CMS however the repo is unfortunately private. We are trying update our gatsby packages so as to use some of the new features coming out. I've updated all my gatsby packages to their latest version except for
gatsby-source-apiserver
.Description
I am seeing an error when running
gatsby build
during the Building production Javascript and CSS bundles step. After which the process completely freezes. There is noBuild Failed
message nor the does the terminal return to normal forcing me to ^C. Here's the error:My start command always runs
npx gatsby clean
first before runningnpx gatsby build
. Building the development bundle works correctly with no errors.I've found similar issues but none of their solutions have worked
#25142
https://stackoverflow.com/questions/59575264/building-gatsby-site-on-netlify-err-callback-was-already-called
https://community.netlify.com/t/first-time-trying-to-deploy-netlify-cms-gatsby-starter-template-fails/12977/8
Based on the above I assume that it has something to do with
gatsby-plugin-netlify-cms
I have tried:
package-lock.json
+node_modules/
and runningnpm install
Steps to reproduce
Unfortunately I was unable to re-produce using a minimal build using the latest versions of
gatsby
andgatsby-plugin-netlify-cms
so I can only assume that it has something to do with the my environment that couldn't be replicated in the code-sandbox.My
gatsby-config.js
,gatsby-node.js
andpackage.json
are massive so I will only be posting what I believe to the relevant sections. I would be happy to post more.gatsby-config.js
gatsby-node.js
package.json
Environment
The text was updated successfully, but these errors were encountered: