bezoerb / grunt-critical

Grunt task to extract & inline critical-path CSS from HTML
Other
154 stars 24 forks source link

grunt-critical 0.1.6 error #16

Closed phpcoder closed 9 years ago

phpcoder commented 9 years ago

After updating to 0.1.6 grunt-critical throws an error:

Unhandled rejection TypeError: Bad argument at TypeError (native) at ChildProcess.spawn (child_process.js:1136:26) at exports.spawn (child_process.js:995:9) at module.exports (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/penthouse/lib/index.js:32:10) at tryCatcher (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/util.js:26:23) at ret (eval at (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/promisify.js:163:12), :13:39) at /project_path/node_modules/grunt-critical/node_modules/critical/lib/core.js:166:20 at tryCatcher (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/promise.js:503:31) at Promise._settlePromiseAt (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/promise.js:577:18) at Async._drainQueue (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/project_path/node_modules/grunt-critical/node_modules/critical/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues as _onImmediate at processImmediate as _immediateCallback

Gruntfile config:

critical: {
  build: {
    options: {
      base: 'src/',
      css: [
          'src/css/styles.css'
      ],
      width: 1200,
      height: 900,
      pathPrefix: './',
    },
    src: 'dist/index-src.html',
    dest: 'src/css/critical.css'
  }
},
bezoerb commented 9 years ago

Looks like something screwed up the spawned phantomjs process in penthouse. Is it possible for you to link the dist/index-src.html so i can debug the error?

phpcoder commented 9 years ago

Ben, thanks for following this. I reinstalled the whole project and don't see the error anymore. Perhaps it was some dependency issue. If the issue reappears I will send you all needed sources.

bezoerb commented 9 years ago

ok, i'll close this for now. feel free to reopen if the issue reappears.

dni commented 7 years ago

same error deleting node_nodules an reinstalling modules helps :)