Skip to content

Node eats all CPU if usePrettier is enabled #11

@beliolfa

Description

@beliolfa

Version

module: 0.1.6
nuxt: 2.14.8

Nuxt configuration

mode:

  • universal
  • spa

Nuxt configuration

htmlValidator: {
    usePrettier: true,
  },

Reproduction

When I run yarn dev it takes 2-3 minutes consuming all CPU, then it shows the warnings in console and loads the page.

What is expected?

Load the app without performance impact

What is actually happening?

Takes a lot to load and show validation errors

Steps to reproduce

set usePrettier to true and yarn dev

Additional information

It is something weird because my coworkers can run it without any issue.
I'm on a Macbook 16" 2019 using Node 12.19.0

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet

Performance analysis?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions