Skip to content
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 Omit when I tried to build #11834

Closed
essamamdani opened this issue Feb 17, 2019 · 3 comments
Closed

Error Omit when I tried to build #11834

essamamdani opened this issue Feb 17, 2019 · 3 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting.

Comments

@essamamdani
Copy link

I am using firebase and Loadable Component in my react app using gatsby. I configured gatsby-node.js for webpack.

exports.onCreateWebpackConfig = ({
  stage,
  rules,
  loaders,
  plugins,
  actions,
}) => {
  actions.setWebpackConfig({
    entry: {
      app: ".cache/production-app"
    },
    output: {
      // e.g app-2e49587d85e03a033f58.js
      filename: `[name]-[contenthash].js`,
      // e.g component---src-blog-2-js-cebc3ae7596cbb5b0951.js
      chunkFilename: `[name]-[contenthash].js`,
      path: `/public`,
      publicPath: `/`
    },
    target: `web`,
    mode: `production`,
    node: {
      ___filename: true
    },
    optimization: {
      runtimeChunk: {
        // e.g webpack-runtime-e402cdceeae5fad2aa61.js
        name: `webpack-runtime`
      },
      splitChunks: false
    },
    plugins: [
      // A custom webpack plugin that implements logic to write out chunk-map.json and webpack.stats.json
      plugins.extractStats(),
    ],
    resolve: {
      alias: {
        components: path.resolve(__dirname, 'src/components'),
        templates: path.resolve(__dirname, 'src/templates'),
        scss: path.resolve(__dirname, 'src/scss'),
      },
    },
  })
}

While building i am getting this error. See below.

error Building static HTML failed

See our docs page on debugging HTML builds for help https://gatsby.app/debug-html

  530 |  * Apply a function to each (key, value) pair in an object or
  531 |  * apply a function to each (index, value) pair in an array
> 532 |  * @param {!(Object|Array)} obj The object or array to iterate over
      |            ^
  533 |  * @param {function(?, ?)} fn The function to apply
  534 |  */
  535 | var each = function (obj, fn) {


  WebpackError: chunk main [initial]
  
  - index.esm.js:532 Parser.pp$4.raise
    [lib]/[@firebase]/database/dist/index.esm.js:532:12
  
  
  
  - static-entry.js:249 Parser.pp$1.parseReturnStatement
    lib/.cache/static-entry.js:249:29
  
  - static-entry.js:101 Parser.pp$1.parseStatement
    lib/.cache/static-entry.js:101:32
  
  - bootstrap:36 Parser.parseStatement
    lib/webpack/bootstrap:36:1
  
  
  - index.esm.js:375 Parser.pp$3.parseFunctionBody
    [lib]/[@firebase]/database/dist/index.esm.js:375:1
  
  
  - auth.esm.js:338 Parser.pp$3.parseExprAtom
    [lib]/[@firebase]/auth/dist/auth.esm.js:338:15
  
  
  - auth.esm.js:201 Parser.pp$3.parseExprSubscripts
    [lib]/[@firebase]/auth/dist/auth.esm.js:201:1
  
  - auth.esm.js:178 Parser.pp$3.parseMaybeUnary
    [lib]/[@firebase]/auth/dist/auth.esm.js:178:18
  
  - auth.esm.js:120 Parser.pp$3.parseExprOps
    [lib]/[@firebase]/auth/dist/auth.esm.js:120:18
  
  - auth.esm.js:103 Parser.pp$3.parseMaybeConditional
    [lib]/[@firebase]/auth/dist/auth.esm.js:103:1
  
  - auth.esm.js:79 Parser.pp$3.parseMaybeAssign
    [lib]/[@firebase]/auth/dist/auth.esm.js:79:1
  
  - index.esm.js:438 Parser.pp$3.parseExprList
    [lib]/[@firebase]/database/dist/index.esm.js:438:1
  
  - auth.esm.js:229 Parser.pp$3.parseSubscripts
    [lib]/[@firebase]/auth/dist/auth.esm.js:229:15
  
  - auth.esm.js:204 Parser.pp$3.parseExprSubscripts
    [lib]/[@firebase]/auth/dist/auth.esm.js:204:18
  
  - auth.esm.js:178 Parser.pp$3.parseMaybeUnary
    [lib]/[@firebase]/auth/dist/auth.esm.js:178:18
  
  - auth.esm.js:120 Parser.pp$3.parseExprOps
    [lib]/[@firebase]/auth/dist/auth.esm.js:120:18
  
  - auth.esm.js:103 Parser.pp$3.parseMaybeConditional
    [lib]/[@firebase]/auth/dist/auth.esm.js:103:1
@wardpeet wardpeet added status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. labels Feb 18, 2019
@wardpeet
Copy link
Contributor

I can't really put my finger on it right away as webpack errors are hard, just wondering why you're overriding so many config values. Could you create a minimal repro so we can run it ourselves and try to figure out the problem?

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 11, 2019
@gatsbot
Copy link

gatsbot bot commented Mar 11, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot
Copy link

gatsbot bot commented Mar 22, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more. status: needs more info Needs triaging and reproducible examples or more information to be resolved status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting.
Projects
None yet
Development

No branches or pull requests

2 participants