-
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
Error: EISDIR: illegal operation on a directory, read #3860
Comments
Probably similarly named files don't throw the error as the local node modules is not a directory configured in the gatsby-config.js for the source filesystem plugin. So these files aren't seen by the plugin. Possibly? |
FWIW, here's my current gatsby-config.js: module.exports = {
siteMetadata: {
title: 'My Gatsby Site'
},
mapping: {
'MarkdownRemark.frontmatter.author': 'AuthorsYaml'
},
plugins: [
// Adding various source folders to the GraphQL layer.
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages/`
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data/`
}
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/assets/images/`
}
},
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: ``
}
},
{
resolve: `gatsby-plugin-typography`,
options: {
pathToConfigModule: `src/utils/typography.js`
}
},
'gatsby-plugin-offline',
'gatsby-plugin-react-next',
'gatsby-plugin-sharp',
'gatsby-transformer-json',
'gatsby-transformer-remark',
'gatsby-transformer-sharp',
'gatsby-transformer-yaml',
'gatsby-plugin-styled-components'
]
}; |
It's because we try to extract graphql queries from |
Description
Within my Gatby project I'm using components from another project. They're placed with my src dir, which looks something like this:
This was working well for some time in development, but then I started receiving Error: EISDIR: illegal operation on a directory, read during build.
The error is thrown when Gatsby comes across a directory in
another-project
'snode_modules
which ends in '.js'; node wants the element to be a file and throws the error because its a DIR. Meanwhile, similarly named directories in Gatsby'snode_modules
are read properly.Environment
Gatsby version: 1.1.28
Node.js version: v9.3.0
Operating System: macOS High Sierra 10.13.3
File contents (if changed):
gatsby-config.js
:package.json
:gatsby-node.js
:gatsby-browser.js
:gatsby-ssr.js
:Actual result
What happened.
Expected behavior
What should happen?
Steps to reproduce
1.
2.
3.
...
The text was updated successfully, but these errors were encountered: