Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
1 │ @import "bootstrap/mixins/banner";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
_bootstrap.scss 1:9 @use
app/assets/stylesheets/application.scss 1:1 root stylesheet
「Ruby on Rails」のバージョン7から、Hotwireという機能が入ったんですけれども、これも、たぶんベロシティをケアしているからこそ生まれたテクノロジーなんじゃないかなと思います。
(中略)
非常に興味深いことで、昔は、Railsアプリケーションは例えば、「15分でWebアプリケーションを作りました」みたいなデモをしていたわけなんですけれども、極端な話、現代的なシングルページアプリケーションを15分で作ることができるようになるという希望が、これによって与えられたということだと思います。
Amplifyで作成したプロジェクトでamplify pushを使ってデプロイしたLambdaを実行すると[ERROR] Runtime.ImportModuleError: Unable to import module 'index': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fipsというエラーが発生する。
amplify pushでLambdaをデプロイしたところ、[ERROR] Runtime.ImportModuleError: Unable to import module 'index': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fipsというエラーが発生
解決策
OpenSSLのバージョンを1.1.1+に変更
次に発生したエラー
[ERROR] Runtime.ImportModuleError: Unable to import module 'index': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips
→ pip install urllib3で解決
次に発生したエラー
[ERROR] Runtime.ImportModuleError: Unable to import module ‘index’:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from “/var/lang/bin/python3.8”
* The NumPy version is: “1.24.4"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named ‘numpy.core._multiarray_umath’
Traceback (most recent call last):
→ 多分NumPyは1.24.4を入れて解決
別に発生したエラー
The following resources failed to deploy:
Resource Name: LambdaFunction (AWS::Lambda::Function)
Event Type: update
Reason: Resource handler returned message: "Unzipped size must be smaller than 135390475 bytes (Service: Lambda, Status Code: 400, Request ID: a3b51e9a-4734-435e-a001-2c7ce1301ee7)" (RequestToken: 92a2a218-8b38-6b12-baff-133e7d710537, HandlerErrorCode: InvalidRequest)
URL: https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/arn%3Aaws%3Acloudformation%3Aap-northeast-1%3A237156174022%3Astack%2Famplify-slackbottesttwo-dev-162215-functionslackLangchainResponder-1PUTGEZ3KV53F%2F6707b020-344c-11ee-a124-0e162f03cf95/events
Bootstrap 5に由来するDart Sassの非推奨警告を抑制する:Railsアプリ(dartsass-rails)を例に
問題:Bootstrap 5に由来する大量の非推奨警告
Bootstrapは、 Sassの仕様変更に対して長期的に取り組みを進めている 最中であるため、Dart Sassでコンパイルすると以下のような非推奨(Deprecation)警告が大量に出力されます。
この大量の警告にまぎれてしまい、自分で書いたコードに対する警告を見つけにくくなるという問題があります。 その結果、自分のコードに警告が出ていないことを確認するだけでも、手間と時間がかかってしまいます。
なお、2024年にリリースされたDart Sass 1.80.0以降、
@importなどの非推奨警告がより積極的に出力されるようになり、この問題がさらに目立つようになりました。解決策:
--quiet-depsで依存ライブラリへの非推奨警告を抑制するこの問題の解決策は、
sassコマンドを実行する際に--quiet-depsオプションを付与することです。 これにより、Bootstrapを含む依存ライブラリ(厳密には、ロードパス経由でインポートされたコード)に対する非推奨警告が出力されなくなります。 なお、ロードパス経由でない自分のコードに対する警告は引き続き出力されます。Railsアプリ(dartsass-rails)で
--quiet-depsを付与する方法dartsass-rails gemを利用するRailsアプリでは、
config/initializers/dartsass.rbを開いて(なければ新規作成して)、 以下のコードを記述します。参考情報
まつもとゆきひろ氏のHotwire評
Rubyの生みの親・まつもとゆきひろ氏が、ベロシティ(つまり開発速度)の向上や維持のために生まれた技術なのではないかとHotwireを評している記事です。
全文はこちらから。
AWS Amplifyを使ったSlackbotの開発
※書き途中の内容です。
問題
Amplifyで作成したプロジェクトでamplify pushを使ってデプロイしたLambdaを実行すると
[ERROR] Runtime.ImportModuleError: Unable to import module 'index': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fipsというエラーが発生する。そもそも実現したいこと
LambdaでLangChainを使ってPineconeからフロントで入力された質問に対する回答をフロントに返したい。
行った手順
amplify pushでLambdaをデプロイしたところ、
[ERROR] Runtime.ImportModuleError: Unable to import module 'index': urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fipsというエラーが発生解決策
OpenSSLのバージョンを1.1.1+に変更
次に発生したエラー
→ pip install urllib3で解決
次に発生したエラー
→ 多分NumPyは1.24.4を入れて解決
別に発生したエラー
→以下の手順で解決
■レイヤーの作り方