gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.27k stars 10.31k forks source link

error [object Object] Input file is missing #28617

Closed asadnisar98 closed 3 years ago

asadnisar98 commented 3 years ago

I am developing a new ecommerce website, I'm facing the following issue while deploying:

Screenshot 2020-12-15 at 8 33 44 AM

I have no idea what this error is for? In dev mode is working, this only happens when I run build. Is there a way to know which file is it talking about?

Environment

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.0 - /usr/local/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 87.0.4280.88
    Firefox: 83.0
    Safari: 14.0
  npmPackages:
    gatsby: ^2.27.0 => 2.27.0
    gatsby-image: ^2.6.0 => 2.6.0
    gatsby-plugin-google-analytics: ^2.6.0 => 2.6.0
    gatsby-plugin-layout: ^1.5.0 => 1.5.0
    gatsby-plugin-manifest: ^2.7.0 => 2.7.0
    gatsby-plugin-nprogress: ^2.5.0 => 2.5.0
    gatsby-plugin-offline: ^3.5.0 => 3.5.0
    gatsby-plugin-react-helmet: ^3.5.0 => 3.5.0
    gatsby-plugin-react-redux: ^1.1.0 => 1.1.0
    gatsby-plugin-root-import: ^2.0.5 => 2.0.5
    gatsby-plugin-sharp: ^2.9.0 => 2.9.0
    gatsby-plugin-transition-link: ^1.20.5 => 1.20.5
    gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4
    gatsby-source-contentful: ^4.1.0 => 4.1.0
    gatsby-source-filesystem: ^2.6.0 => 2.6.0
    gatsby-source-shopify: ^3.5.0 => 3.5.0
    gatsby-transformer-sharp: ^2.7.0 => 2.7.0
  npmGlobalPackages:
    gatsby-cli: 2.11.3

File contents

gatsby-config.js

const path = require('path')

require('dotenv').config({
  path: `.env.${process.env.NODE_ENV}`
})

module.exports = {
  plugins: [
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-transition-link`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },

    {
        resolve: "gatsby-plugin-web-font-loader",
        options: {
          custom: {
            families: ["JostRomanSemiBold, JostRomanMedium, LoraRegular, JostRomanRegular, JostLight"],
            urls: ["fonts/fonts.css"],
          },
        },
      },

    {
    resolve: `gatsby-plugin-nprogress`,
    options: {
      color: `tomato`,
      showSpinner: false,
    },
  },
    {
      resolve: `gatsby-source-contentful`,
      options: {
        spaceId: process.env.CONTENTFUL_SPACE_ID,
        accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
      },
    },
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    `gatsby-plugin-layout`,
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `gatsby-starter-default`,
        short_name: `starter`,
        start_url: `/`,
        background_color: `#663399`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        icon: `src/images/gatsby-icon.png`,
      },
    },
    {
      resolve: `gatsby-source-shopify`,
      options: {
        shopName: process.env.SHOP_NAME,
        accessToken: process.env.SHOPIFY_ACCESS_TOKEN,
        verbose: true,
      },
    },
    {
      resolve: 'gatsby-plugin-root-import',
      options: {
        '~': path.join(__dirname, 'src/'),
      },
    },
    {
      resolve: `gatsby-plugin-google-analytics`,
      options: {
        trackingId: "UA-134421805-1",
        anonymize: true,
        respectDNT: true,
      },
    },
  ],
}

github repo link

https://github.com/asadnisar98/ecommerce/
KyleAMathews commented 3 years ago

Yeah saw the same thing when working on a PR. Not sure when it started happening but this is the/a fix https://github.com/gatsbyjs/gatsby/pull/28614#discussion_r542824222

KyleAMathews commented 3 years ago

You can edit the same file for now and console.log the message to see what file it is erroring on.

asadnisar98 commented 3 years ago

it worked thanks