es128 / progeny

:baby: Recursively finds dependencies of style and template source files
MIT License
29 stars 15 forks source link

Cannot read property 'regexp' of undefined #9

Closed banyan closed 9 years ago

banyan commented 9 years ago

After 28th Oct, this error happens occasionally (not always) when I try brunch build. Have you noticed this error? currently I'm using sass-brunch with 1.0.3.

/home/ubuntu/foo/node_modules/sass-brunch/node_modules/progeny/lib/index.js:158
      regexp = def.regexp;
                  ^
TypeError: Cannot read property 'regexp' of undefined
  at SassCompiler.progeny [as getDependencies] (/home/ubuntu/foo/node_modules/sass-brunch/node_modules/progeny/lib/index.js:158:19)
  at getDependencies (/home/ubuntu/foo/node_modules/brunch/lib/fs_utils/pipeline.js:40:23)
  at /home/ubuntu/foo/node_modules/brunch/lib/fs_utils/pipeline.js:80:16
  at ChildProcess.<anonymous> (/home/ubuntu/foo/node_modules/sass-brunch/index.js:147:7)
  at ChildProcess.EventEmitter.emit (events.js:98:17)
  at maybeClose (child_process.js:743:16)
  at Socket.<anonymous> (child_process.js:956:11)
  at Socket.EventEmitter.emit (events.js:95:17)
es128 commented 9 years ago

Do any of the source files you're compiling with sass-brunch somehow have a file extension other than scss or sass?

banyan commented 9 years ago
    stylesheets:
      defaultExtension: 'sass'
      joinTo:
        'stylesheets/app.css': /^(app|vendor|bower_components)/
      order:
        before: [
          'bower_components/normalize-css/normalize.css'
          'vendor/stylesheets/foo.css'
        ]   

@es128

Thanks for the response! Yes, I have css files in vendor, but is this matter?

es128 commented 9 years ago

Shouldn't be a problem - those files should get run through the css-brunch compiler.

I'm not sure what the issue is, and will need more information to be able to help with diagnosing it. What is your brunch ---version? Can you provide the output of brunch b -d?

es128 commented 9 years ago

Should be fixed in sass-brunch 1.8.7

banyan commented 9 years ago

@es128

oh, Thanks a lot!! I'll have a look, and just applied new version is worked!