Anyone ever had trouble with serverless-bundle pac...
# help
j
Anyone ever had trouble with serverless-bundle packaging a lib? I’m reaching at straws here bc I’m not sure what’s wrong with my approach. I’m specifically working with
@pdf-lib/fontkit
If I run directly with node it works correctly but when I go to test locally with
sls invoke local...
it doesn’t appear to be pulling the package in. I get
fontkit.create is not a function
and it’s as if fontkit doesn’t exist when running this way
f
Hey @Jacob Hayes, lemme pull in @Jay as he’s more familiar with bundle.
j
I finally got it to work but I had to use it with sls by referencing it as
fontkit.default
instead of just
fontkit
I wonder if I may be due to my node version being different locally than what we have configured for sls
j
Oh interesting. I haven’t used
fontkit
before.
j
I’m assuming it’s more on me with node env, I just realized it is different on my machine vs what we’re telling sls to run it as But yeah fontkit lets you use custom fonts with the pdf-lib packages