Skip to content

Build crashes for directories with only images #39

@fson

Description

@fson

If there is a folder in pages that includes only images (no jsx/md/html pages), the build crashes with an error Cannot read property 'path' of undefined:

> mkdir pages/images
> touch pages/images/foo.jpg
> gatsby build
Generating static html pages
Compiling production bundle.js
Copying assets
/Users/ville/Projects/gatsby/lib/utils/post-build.coffee:37
        newPath = parsePath(page.path).dirname + parsed.basename;
                                ^

TypeError: Cannot read property 'path' of undefined
  at copy (/Users/ville/Projects/gatsby/lib/utils/post-build.coffee:31:16)
  at /Users/ville/Projects/gatsby/node_modules/async/lib/async.js:358:13
  at /Users/ville/Projects/gatsby/node_modules/async/lib/async.js:239:13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions