Skip to content
New issue

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

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

Already on GitHub? # to your account

pino is not supported #794

Closed
boyander opened this issue Oct 17, 2021 · 2 comments
Closed

pino is not supported #794

boyander opened this issue Oct 17, 2021 · 2 comments

Comments

@boyander
Copy link

I was creating an action with some custom logging scheme, but adding pino logger package breaks my build.

@styfle
Copy link
Member

styfle commented Oct 18, 2021

It works for me

yarn init -y
yarn add pino
echo "const logger = require('pino')(); logger.info('hello')" > index.js
npm i -g @vercel/ncc
ncc build index.js
rm -rf node_modules
node dist/index.js
# prints hello

@styfle styfle closed this as completed Dec 10, 2021
@barlock
Copy link

barlock commented Jul 14, 2022

For anyone else who stumbles upon this issue. It's caused by pino using a worker thread and ncc doesn't compile them by default. Pass --asset-builds to ncc fix the problem.

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

No branches or pull requests

3 participants