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

Segmentation Fault 11 when packaging consola with Vercel pkg #261

Open
slowkoder opened this issue Nov 18, 2023 · 1 comment
Open

Segmentation Fault 11 when packaging consola with Vercel pkg #261

slowkoder opened this issue Nov 18, 2023 · 1 comment

Comments

@slowkoder
Copy link

Environment

  • Node 16.20.2
  • NPM 8.19.4
  • Consola 3.2.3
  • Vercel pkg 5.8.0
  • MacOS 10.13.6

Reproduction

  1. Install pkg and consola NPM packages
  2. Create JS file with the following:
// index.cjs
const {consola} = require('consola');
consola.info('This is info!');
  1. Package into CLI executable using pkg
# Via terminal
npx pkg "./index.cjs" -t "node16-macos" -o app
  1. Run the application
./app
  1. Error is displayed
Segmentation fault: 11

Describe the bug

When trying to package consola using vercel pkg I get the following error:

Segmentation fault: 11

See Reproduction for steps to replicate

Additional context

No response

Logs

No response

@septatrix
Copy link

I fell into this rabbit hole today. If vercel happens to compile their nodejs runtime with --with-intl=small-icu then this might actually be a bug in nodejs itself which I just filed: nodejs/node#51752
This package could implement a workaround but I do not know of a good method to correctly test the level of ICU support, and if there were, it should likely be implemented in string-width itself so that everyone benefits.

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

2 participants