yarbsemaj / sveltekit-adapter-lambda

An adapter to build a SvelteKit app into a lambda ready for deployment with lambda proxy via the Serverless Framework or CDK.
https://www.npmjs.com/package/@yarbsemaj/adapter-lambda
MIT License
77 stars 16 forks source link

Issue with superagent-proxy #23

Closed alexbjorlig closed 1 year ago

alexbjorlig commented 1 year ago

I'm trying to use this plugin, but get:

error during build:
Error: Build failed with 1 error:
../../node_modules/rest-facade/src/Client.js:38:12: error: Could not resolve "superagent-proxy" (mark it as external to exclude it from the bundle)

Do you know what could cause this?

Seems to work if I add "superagent-proxy": "3.0.0" to dependencies 😅

yarbsemaj commented 1 year ago

Hi @alexbjorlig , Thankyou for your interest in my project!

Hummm, this seems to be an issue with a dependency requiring a bugged version of rest-facade, I can see the issue was raised here https://github.com/ngonzalvez/rest-facade/issues/63. I’m away from a PC for now but I’ll investigate where this package is been used and if needs be downgrade it to a previously working version.

yarbsemaj commented 1 year ago

Hi @alexbjorlig, iv had a look tough my package.lock and i can't see rest-facade in there. Im wondering if its a package that you make use of as part of your application

alexbjorlig commented 1 year ago

Hi @yarbsemaj - it could be. We are on a rather large project, but as I mentioned it seems like it was fixed by adding superagent-proxy to our dependencies. Just FYI - in approximately 10 minutes we have a meeting with a sales person from serverless.com, and will discuss the possibility to migrate there from Heroku. We (21RISK) would use this plugin as a starting point 😎 Do you have anything in production using this plugin - or some other learnings you would like to share?

yarbsemaj commented 1 year ago

Hi @alexbjorlig I don't unfortunately, we are all next.js at work. TBH I built this to host my small personal site because at the time there were no good ones. It's just grown from there.

I would have caviated this with sveltekit's boilerplate warning about breaking changes (and speaking from experience it was valid) , but it looks like recently they put out RC1 and removed the warning. So it's probably safe now....