question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Penthouse error blocks generating file

See original GitHub issue

Hi, I get following error where I sadly have no idea where the problem is:

Unhandled rejection TypeError: Bad argument
    at TypeError (native)
    at ChildProcess.spawn (internal/child_process.js:289:26)
    at exports.spawn (child_process.js:380:9)
    at generateCriticalCss (/Users/nils/repos/schoenwaldnils/blog/node_modules/penthouse/lib/index.js:95:10)
    at process._tickCallback (internal/process/next_tick.js:103:7)

I use jekyll and generate the site to _site where the index.html lies. I try to generate the main-critical.css.

My gulp task:

gulp.task('critical', function (cb) {
  critical.generate({
    inline: false,
    base: '_site',
    src: 'index.html',
    dest: 'build/main-critical.css',
    width: 320,
    height: 480,
    minify: true,
  });
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bezoerbcommented, Aug 17, 2017

@pocketjoso Thanks for your work!

1reaction
pocketjosocommented, Aug 13, 2017

Regarding the install error, I just fixed a (new) bug with the missing config.json file in 0.11.11 - so if you re-install criticial/penthouse you should get the fix for this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

penthouse - Bountysource
Generate critical css file via two source .css files and a website URL; Block website stylesheets and add the generated critical css only....
Read more >
Extract critical CSS - web.dev
Learn how to improve render times with critical CSS technique and how to choose the best tool for your project.
Read more >
critical - npm
Take a look at this Gulp project which demonstrates using Critical to generate and inline critical-path CSS. It also includes a mini-tutorial ...
Read more >
How To Use Critical CSS To Speed Up Website Performance
Critical CSS is kind of like the opposite of render blocking CSS – the ... Penthouse to do the heavy lifting of generating...
Read more >
Critical CSS in WordPress: What It Is and How to Optimize ...
In other words, critical CSS is key to optimizing performance. Before rendering the page, your browser needs to download and parse the CSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found