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

Serverless-bundle compatibility #140

Open
loopiezlol opened this issue Jun 22, 2023 · 0 comments
Open

Serverless-bundle compatibility #140

loopiezlol opened this issue Jun 22, 2023 · 0 comments

Comments

@loopiezlol
Copy link

Hello. I have a serverless app written in Typescript and compiled using serverless-bundle.

Seems there's a compatibility issue between lumigo and serverless-bundle. When trying to deploy:

  • first, lumigo wraps my typescript files, turning them into js files
> sls deploy --stage $SLS_ENV

Deploying enkicamp-hydra to stage staging (*********)
serverless-lumigo: there are 86 function(s) to wrap...
serverless-lumigo: {"name":"enkicamp-hydra-staging-healthcheck","description":"endpoint to serve as an API healthcheck","handler":"functions/common/api/healthcheck/index.handler","events":[{"http":{"method":"get","path":"/healthcheck","cors":true}}],"localName":"healthcheck"}
...
serverless-lumigo: installing @lumigo/tracer@latest...
serverless-lumigo: 
up to date, audited 2510 packages in 7s

234 packages are looking for funding
 run `npm fund` for details

27 vulnerabilities (13 low, 4 moderate, 9 high, 1 critical)

To address issues that do not require attention, run:
 npm audit fix

To address all issues possible (including breaking changes), run:
 npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

serverless-lumigo: wrapping [functions/common/api/healthcheck/index.handler]...
serverless-lumigo: writing wrapper function to [/home/circleci/hydra/_lumigo/healthcheck.js]...
  • second, serverless-bundle runs, trying to compile the typescript
Bundling with Webpack...
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0

YOUR TYPESCRIPT VERSION: 4.9.5

Please only submit bug reports when using the officially supported version.
webpack compiled with 1 error
ERROR in /home/circleci/hydra/_lumigo/healthcheck.js
  2:16  error  Require statement not part of import statement  @typescript-eslint/no-var-requires
  5:17  error  Require statement not part of import statement  @typescript-eslint/no-var-requires

✖ 2 problems (2 errors, 0 warnings)

This looks wrong to me. Shouldn't serverless-bundle first bundle compile all ts files, then lumigo wrap them?

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

1 participant