Skip to content

Silently fails/stalls webpack with no error #100

Closed

Description

@evandegr

I have 2 imports that I use in multiple scss files that look like the following:

@import 'variables';
@import 'functions';

Everything works fine until I hit one file that has the exact same imports. Then, I see webpack build stall and it shows no errors. If I remove the import for this file, everything works, if I add it, it stalls. I don't understand why its happening because it's using the exact same imports. Problem still occurs if I remove everything in that file except for the imports. Problem does not occur if I remove the imports as well.

Activity

  1. changed the title [-]Silently fails/stalls with no error[/-] [+]Silently fails/stalls webpack with no error[/+] on May 19, 2015
  2. maman commented on May 19, 2015

    @maman

    got this issue too.

    the directory structure is something like this.

    ├── moduleA
    │   ├── moduleA.controller.js
    │   ├── moduleA.style.scss
    │   ├── moduleA.template.html
    ├── moduleB
    │   ├── moduleB.controller.js
    │   └── moduleB.style.scss
    │   ├── moduleB.template.html
    ├── moduleC
    │   ├── moduleC.controller.js
    │   ├── moduleC.style.scss
    │   └── moduleC.template.html
    ├── styles
    │   ├── _settings.scss
    │   └── main.scss
    └── app.js
    
    1. the module-specific styles will be require’d in the controller.
    2. all module-specific styles has @import syntax to _settings.scss file.
    3. the main.scss is the ‘global’ stylesheet which require’d in the app.js file, and has @import syntax to _settings.scss file.

    also I used foundation-apps library heavily, so main.scss file has @import to the foundation-apps/foundation, and the module-specific styles has @import to some foundation functions that I use for the module, such as foundation-apps/components/grid.

    the build succeeds when I first remove the require on the controller, and add it again after the first build has succeed (I use webpack-dev-server with --hot).

  3. jhnns commented on May 20, 2015

    @jhnns
    Contributor

    That's strange, thx for reporting this. Could you set up a small gist that reproduces the error?

  4. saper commented on May 20, 2015

    @saper

    Does putting env UV_THREADPOOL_SIZE=100 before node invocation help? If yes, then this is sass/node-sass#857

  5. Antontelesh commented on May 20, 2015

    @Antontelesh

    I'm reporting the same issue.
    Putting env UV_THREADPOOL_SIZE=100 before webpack invocation does not help.

  6. Antontelesh commented on May 20, 2015

    @Antontelesh

    Sorry, it helps but builds very slowly. I've been waiting for a couple of minutes and it have compiled after all :)

  7. maman commented on May 20, 2015

    @maman

    @jhnns sorry I can't, still in the middle of a project 😣
    currently I'm using the env UX_THREADPOOL_SIZE=100, and it definitely helps. thanks @saper !

  8. evandegr commented on May 20, 2015

    @evandegr
    Author

    Also downgrading to 0.5.0 and using node-sass 3.1.1 fixed this for me.

  9. saper commented on May 20, 2015

    @saper

    3.1.1 also suffers from threading problem, so there must be some other, additional issue. @evandegr can you post somewhere a minimal but complete example to reproduce this issue?

  10. ftorre104 commented on May 21, 2015

    @ftorre104

    I had this same issue. It happens when I import a utility .scss file (it has mixins) into 2 or more other scss files. If I just import it into 1 scss file, webpack builds correctly.

    However, I have no problem with config .scss files that only define variables. I can include those into as many .scss files with no build problem.

    env UV_THREADPOOL_SIZE=100 worked for me too.

  11. jeffling commented on May 21, 2015

    @jeffling

    Weird, I have the same problem and fixed it by downgrading to 0.5.0. Tried 0.6.0 and it didn't work.

  12. haustraliaer commented on May 26, 2015

    @haustraliaer

    We experienced this issue as well - multiple imports over different files of a global (@import '~boilerplate';) mixin/variable file completely stalled webpack.

  13. saper commented on May 26, 2015

    @saper

    I would really love if webpack community could produce a simple, self-contained setup to reproduce the issue.

  14. haustraliaer commented on May 26, 2015

    @haustraliaer

    @saper I'm literally doing that right now ;)

  15. jeffling commented on May 26, 2015

    @jeffling

    @haustraliaer nice! :) i was going going to do it this weekend but ran out of time. Would really love to get this resolved so we can stop adding 30 sass include paths into our build. Let me know if you need any help!

  16. 50 remaining items

  17. jsg2021 commented on Mar 25, 2017

    @jsg2021

    From what i can gather, it's really a cyclical import issue. I don't think there's anything to do for sass-loader other than to detect/report the problem for the user to fix.

  18. mechanicious commented on Jul 27, 2017

    @mechanicious

    Webpack stalled at compiling Javascript files through babel.

    Adding the options below to webpack.config.js solved the issue for me. These options are described in docs.

    watchOption: {
      aggregateTimeout: 1,
      poll: 1000
    }

    So my Webpack config file looks now like this

    var path = require('path');
    
    module.exports = {
      entry: ["./js/index.js"],
      devtool: "source-map",
      output: {
        path: path.join(__dirname, 'public/dist'),
        filename: "bundle.js"
      },
      module: {
        loaders: [
          {
            test: /\.js?$/,
            loader: "babel",
            query: {
              presets: ["es2015"],
              plugins: ["transform-flow-strip-types", "transform-class-properties"]
            },
            include: [
              path.join(__dirname, 'js')
            ]
          },
          {
            test: /\.css$/,
            loaders: ['style', 'css']
          },
          {
            test: /\.json$/,
            loaders: ['json'],
            include: [
              path.join(__dirname, 'js'),
            ],
          },
    
        ]
      },
      resolve: {
        extensions: ['','.js', '.jsx', '.json', '.css']
      },
      watchOptions: {
        aggregateTimeout: 1,
        poll: 1000
      }
    };
  19. added a commit that references this issue on Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions