elct9620 / hanami-lambda

Hanami Lambda is a gem that provides a way to run hanami application on AWS Lambda.
MIT License
4 stars 3 forks source link

AWS SAM could not found Gem #1

Open elct9620 opened 1 month ago

elct9620 commented 1 month ago

By the default the AWS Lambda run fail with this error message

Could not find hanami-2.1.1, hanami-assets-2.1.0, hanami-controller-2.1.0, hanami-lambda-0.2.0, hanami-router-2.1.0, hanami-validations-2.1.0, hanami-view-2.1.0, dry-types-1.7.2, puma-6.4.2, rake-13.2.1, hanami-reloader-2.1.0, hanami-cucumber-0.1.0, hanami-rspec-2.1.0, rubocop-1.64.0, dry-configurable-1.1.0, dry-core-1.0.1, dry-inflector-1.0.0, dry-logger-1.0.4, dry-monitor-1.0.1, dry-system-1.0.1, hanami-cli-2.1.1, hanami-utils-2.1.0, zeitwerk-2.6.15, rack-2.2.9, dry-struct-1.6.0, mustermann-3.0.0, mustermann-contrib-3.0.0, dry-validation-1.10.0, temple-0.10.3, tilt-2.3.0, bigdecimal-3.1.8, concurrent-ruby-1.2.3, dry-logic-1.5.0, nio4r-2.7.3, cucumber-9.2.0, rspec-3.13.0, json-2.7.2, language_server-protocol-3.17.0.3, parallel-1.24.0, parser-3.3.1.0, rainbow-3.1.1, regexp_parser-2.9.0, rexml-3.2.8, rubocop-ast-1.31.3, ruby-progressbar-1.13.0, unicode-display_width-2.5.0, dry-events-1.0.1, dry-auto_inject-1.0.1, dry-cli-1.0.0, dry-files-1.1.0, dry-transformer-1.0.1, ice_nine-0.11.2, hansi-0.2.1, dry-initializer-3.1.1, dry-schema-1.13.4, builder-3.2.4, cucumber-ci-environment-10.0.1, cucumber-core-13.0.2, cucumber-cucumber-expressions-17.1.0, cucumber-gherkin-27.0.0, cucumber-html-formatter-21.3.1, cucumber-messages-22.0.0, diff-lcs-1.5.1, mini_mime-1.1.5, multi_test-1.1.0, sys-uname-1.2.3, rspec-core-3.13.0, rspec-expectations-3.13.0, rspec-mocks-3.13.1, ast-2.4.2, racc-1.7.3, strscan-3.1.0, cucumber-tag-expressions-6.1.0, ffi-1.16.3, rspec-support-3.13.1 in cached gems or installed locally
elct9620 commented 1 month ago

It may caused by package gems in M3 (ARM) but run on an x86 server. Adding --use-container may resolve it.

elct9620 commented 1 month ago

Another error is caused by the default behavior will excludes development and test groups but cli does not exclude. It causes the unnecessary gem to be loaded in Lambda.