NodejsNpmEsbuildBuilder:NpmInstall - NPM Failed: npm WARN config production Use `--omit=dev` instead
Maintainer thường phản hồi trong vòng 10 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- nodejs, python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với aws_lambda_builders/workflows/nodejs_npm/actions.py tại dòng được tham chiếu, sau đó tái hiện bằng sam build sử dụng một layer node_modules và npm �3e=9.6.7, hoặc npm i --production. Hoàn tất khi quá trình build thành công mà cảnh báo về cấu hình production của npm không bị xử lý như một lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description:
It looks like at some point npm deprecated the --production parameter and started WARNing about it in stderr, which seems to break sam build.
I'm not sure which version of npm introduced that but the relevant range in npm code git-blames back to a couple years ago.
I found --production still in unconditional use in the corresponding builder {actions.py:111}. I think it needs to be upgraded to --omit=dev depending on the npm version.
Steps to reproduce:
sam build with a node_modules layer and npm version >= 9.6.7
Alternatively, just run npm i --production and observe the same warning. Clearly, it's not supposed to be called with --production anymore.
Observed result:
Running NodejsNpmEsbuildBuilder:CopySource
Running NodejsNpmEsbuildBuilder:CopySource
Running NodejsNpmEsbuildBuilder:NpmInstall
Running NodejsNpmEsbuildBuilder:NpmInstall
Running NodejsNpmEsbuildBuilder:NpmInstall
Running NodejsNpmEsbuildBuilder:EsbuildBundle
Running NodejsNpmEsbuildBuilder:EsbuildBundle
Running NodejsNpmEsbuildBuilder:EsbuildBundle
Build Failed
Error: NodejsNpmEsbuildBuilder:NpmInstall - NPM Failed: npm WARN config production Use `--omit=dev` instead.
Expected result:
Wouldn't expect to see the warning, and wouldn't expect it to be treated as an error.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS:
image: node:18 - If using SAM CLI,
sam --version: 1.98.0 - AWS region: us-east-1
Add --debug flag to any SAM CLI commands you are running
So the CI/CD pipeline failed, and I went to create this bug report, and then I read about --debug and added it to sam commands in the pipeline... But it did not fail this time! I'm confused and I cannot reproduce this issue reliably. Still, just looking at the code of aws-lambda-builders and npm, the problem seems to be present.
- Ngôn ngữ chính
- Python
- Star
- 381
- Fork
- 161
- Merge trung bình
- 9 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws/aws-lambda-builders
-
python_uv: `UvConfig.compile_bytecode` is never passed to uv, so the option has no effectCó thể đã có người làm @xujiantop-crypto đã nhận 29 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/aws-lambda-builders#925 · 1 reaction ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Bytecode compiled during build is always discarded at runtime: SAM packaging writes 1980 timestamps, so timestamp-based .pyc never validateCó thể đã có người làm @xujiantop-crypto đã nhận 29 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
aws/aws-lambda-builders#924 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Bug: PythonUvBuilder fails to build app with dependencies on editable installs in the workspaceCó thể đã có người làm @noritada đã nhận 98 ngày trước. Đang mởstage/needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
aws/aws-lambda-builders#892 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
stage/needs-triage type/feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
aws/aws-lambda-builders#839 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Feature request: Skip binary validation when builder is not used for any languageCó thể làm lại được @saketh-bandi đã nhận 42 ngày trước và không có pull request nào đang mở. Đang mởarea/build contributors/good-first-issue contributors/welcome type/feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
aws/aws-lambda-builders#831 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 10 ngày
Tất cả issue của aws/aws-lambda-builders
Issue tương tự
-
`burr` fails to start when the Python path has a space in itCó thể đã có người làm @enekoreto đã nhận hôm nay. Đang mởstatus/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
gemini 出现了新的域名需要加入Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
debpalash/VoiceStudio#2903 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dagster-io/community-integrations#367 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
aws-samples/sample-per-model-bedrock#243 ·
Maintainer thường phản hồi trong vòng 1 ngày