Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL Intl.Segmenter is not a constructor with Node 14 #204

Closed
dockleryxk opened this issue Jun 27, 2023 · 5 comments
Closed

FATAL Intl.Segmenter is not a constructor with Node 14 #204

dockleryxk opened this issue Jun 27, 2023 · 5 comments

Comments

@dockleryxk
Copy link

dockleryxk commented Jun 27, 2023

Environment

Node 14.12.4, trying to build a Nuxt 2 project

Reproduction

Unfortunately, this is a private repo

Describe the bug

Build a Nuxt 2 project on Node 14 using consola v3.2.x – get this fatal error.

If I can provide more context, please let me know, but this seems cut and dry.

I did not try other Node versions

Additional context

When forcing consola v3.1.x, there is no issue

Logs

12:48:36
   FATAL  Intl.Segmenter is not a constructor
12:48:36
  
12:48:36
    at stringWidth (node_modules/@nuxt/cli/node_modules/consola/dist/shared/consola.2a3942ff.cjs:464:37)
12:48:36
    at FancyReporter.formatLogObj (node_modules/@nuxt/cli/node_modules/consola/dist/shared/consola.2a3942ff.cjs:585:41)
12:48:36
    at FancyReporter.log (node_modules/@nuxt/cli/node_modules/consola/dist/shared/consola.deac7d5a.cjs:53:23)
12:48:36
    at Consola._log (node_modules/@nuxt/cli/node_modules/consola/dist/core.cjs:383:16)
12:48:36
    at resolveLog (node_modules/@nuxt/cli/node_modules/consola/dist/core.cjs:351:14)
12:48:36
    at Consola._logFn (node_modules/@nuxt/cli/node_modules/consola/dist/core.cjs:379:5)
12:48:36
    at Consola.fatal (node_modules/@nuxt/cli/node_modules/consola/dist/core.cjs:308:19)
12:48:36
    at NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:366:17)
@wilhantian
Copy link

me too...

@maxJeongCC
Copy link

me too..too!

@pi0 pi0 changed the title FATAL Intl.Segmenter is not a constructor FATAL Intl.Segmenter is not a constructor with Node 13 Jun 28, 2023
@pi0 pi0 changed the title FATAL Intl.Segmenter is not a constructor with Node 13 FATAL Intl.Segmenter is not a constructor with Node 14 Jun 28, 2023
@pi0
Copy link
Member

pi0 commented Jun 28, 2023

Hi. This is an incompatibility with Node.js 14 (which is EOL since April). Please consider upgrading your Runtime Node.js to 16+. (This comes from string-width@6)

As a workaround if you cannot upgrade Node version, you can set CI=1 environment variable.

@pi0 pi0 closed this as completed in 2e72913 Jun 28, 2023
@pi0
Copy link
Member

pi0 commented Jun 28, 2023

3.2.2 has a workaround for Node 14 backward compatibility (https://github.com/unjs/consola/releases/tag/v3.2.2)

@dockleryxk
Copy link
Author

@pi0 thank you for adding this workaround – I'm sure it's annoying supporting an EOL version but it's very much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants