A Gatsby source plugin for sourcing local files into a Gatsby application, identical in usage to gatsby-source-filesystem but with an asynchronous queue that limits concurrent file reads to prevent EMFILE errors on large sites. Version 5.3.1 requires Node >=18 and Gatsby ^5.0.0-next. Key differentiator: configurable concurrent file limit (default 800) via GATSBY_CONCURRENT_FILES environment variable, and concurrent download limit (default 200) via GATSBY_CONCURRENT_DOWNLOAD. Ships TypeScript types. Maintains full compatibility with transformer plugins like gatsby-transformer-remark and gatsby-transformer-json. Only difference from upstream is the queuing mechanism; all options, helper functions (createFilePath, createRemoteFileNode, createFileNodeFromBuffer), and query patterns are identical.
npm install gatsby-source-filesystem-with-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configure plugin in gatsby-config.js with a source directory and query the created File nodes in a page component.
Update Node to >=18.0.0, or install an older version of the package (e.g., 4.x).
Ensure your project uses Gatsby 5.x. If on Gatsby 4, use gatsby-source-filesystem instead.
Switch to gatsby-source-filesystem unless you specifically need queue concurrency control.
Set GATSBY_CONCURRENT_FILES to a lower value (e.g., 200) if you experience 'EMFILE: too many open files' errors.
Keep GATSBY_CONCURRENT_DOWNLOAD reasonable (e.g., <=500) or adjust based on system limits.
If you need to remove a default ignore, you'll need to fork the plugin. Alternatively, use gatsby-source-filesystem which may allow customization.
Always pass node (File node or transformer-created node with parent) and getNode function from onCreateNode API.
Set environment variable GATSBY_CONCURRENT_FILES to a lower value, e.g., 100, or increase the OS file limit using `ulimit -n 2048`.
Run `npm install gatsby-source-filesystem-with-queue` or `yarn add gatsby-source-filesystem-with-queue`.
Ensure the 'path' option is a string, e.g., path: `${__dirname}/src/pages/`.Import as named export: `import { createFilePath } from 'gatsby-source-filesystem-with-queue'`.