FormidableLabs / FormidableLabs/serverless-jetpack
Resolution error: cannot find module
- Dominant language
- JavaScript
- Stars
- 281
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to bundle my NestJS app using Jetpack. I get this error:
```
Serverless: [serverless-jetpack] Packaging 2 functions, 0 services, and 0 layers with concurrency 4
Error --------------------------------------------------
Error: Encountered resolution error in /Users/sam/Work/personal/test-api/dist/apps/hello/lambda.js for @nestjs/microservices/microservices-module: Error: Cannot find module '@nestjs/microservices/microservices-module' from '/Users/sam/Work/personal/test-api/dist/apps/hello'
at /Users/sam/Work/personal/test-api/node_modules/trace-deps/lib/trace.js:278:17
at async Promise.all (index 0)
at async traceFile (/Users/sam/Work/personal/test-api/node_modules/trace-deps/lib/trace.js:231:19)
at async _recurseDeps (/Users/sam/Work/personal/test-api/node_modules/trace-deps/lib/trace.js:101:22)
at async traceFiles (/Users/sam/Work/personal/test-api/node_modules/trace-deps/lib/trace.js:349:19)
at async Object.globAndZip (/Users/sam/Work/personal/test-api/node_modules/serverless-jetpack/util/bundle.js:512:20)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 14.6.0
Framework Version: 2.17.0 (local)
Plugin Version: 4.4.1
SDK Version: 2.3.2
Components Version: 3.4.3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
I need Jetpack to ignore this as the module is a dynamic dependency of NestJS and is not actually consumed by my application. How do I make this work?
Contributor guide
Assessment
This issue has not been assessed yet.