generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedloggerThis item relates to the Logger UtilityThis item relates to the Logger Utility
Milestone
Description
Bug description
npm productionpackage of `powetools-logger' is breaking in 0.0.7, due to importing commons package in Logger.ts- Error due to the
testsexport that are part of the commons/index
Expected Behavior
0.0.7 version to work fine without module error when tests folder are removed at the time of pruning for production-ready build
(Or if the package tests being exported out of commons is needed, please rename the folder as pruning utilities like node-prune are trimming off tests)
Current Behavior
No Module Found Error when using Powertools Logger package
stack": [
"Runtime.ImportModuleError: Error: Cannot find module './tests/resources/contexts'",
"Require stack:",
"- /var/task/node_modules/@aws-lambda-powertools/commons/lib/index.js",
"- /var/task/node_modules/@aws-lambda-powertools/logger/lib/Logger.js",
"- /var/task/node_modules/@aws-lambda-powertools/logger/lib/index.js",
Possible Solution
- Do not export
tests - Or if the package
testsneeds to be exported, please rename the folder as pruning utilities like node-prune are trimming offtests)
Steps to Reproduce
npm installproject with"@aws-lambda-powertools/logger": "^0.7.0"node-pruneusing https://github.com/tj/node-prune
Environment
wemakeagame and Muthuveerappanv
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedloggerThis item relates to the Logger UtilityThis item relates to the Logger Utility
