NodejsNpmEsbuildBuilder:NpmInstall - NPM Failed: npm WARN config production Use `--omit=dev` instead
Los mantenedores suelen responder en 10 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- nodejs, python
- Área
- build-system
Línea de trabajo
Comienza con aws_lambda_builders/workflows/nodejs_npm/actions.py en la línea referenciada y, a continuación, reproduce el problema con sam build usando una capa de node_modules y npm �3e=9.6.7, o npm i --production. Se considera terminado cuando la compilación se completa correctamente sin que la advertencia de configuración de producción de npm se trate como un error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 381
- Forks
- 161
- Merge medio
- 9 d 8 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aws/aws-lambda-builders
-
python_uv: `UvConfig.compile_bytecode` is never passed to uv, so the option has no effectPosiblemente ocupada @xujiantop-crypto la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws/aws-lambda-builders#925 · 1 reacción ·
Los mantenedores suelen responder en 10 días
-
Bytecode compiled during build is always discarded at runtime: SAM packaging writes 1980 timestamps, so timestamp-based .pyc never validatePosiblemente ocupada @xujiantop-crypto la tomó hace 26 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 64/100
aws/aws-lambda-builders#924 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 10 días
-
Bug: PythonUvBuilder fails to build app with dependencies on editable installs in the workspacePosiblemente ocupada @noritada la tomó hace 95 días. Abiertostage/needs-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
aws/aws-lambda-builders#892 ·
Los mantenedores suelen responder en 10 días
-
stage/needs-triage type/feature
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
aws/aws-lambda-builders#839 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 10 días
-
Feature request: Skip binary validation when builder is not used for any languageQuizá libre de nuevo @saketh-bandi la tomó hace 40 días y no hay ningún pull request abierto. Abiertoarea/build contributors/good-first-issue contributors/welcome type/feature
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
aws/aws-lambda-builders#831 · 3 comentarios ·
Los mantenedores suelen responder en 10 días
Todos los issues de aws/aws-lambda-builders
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
gradio-app/gradio#13964 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jbacalso24/mimry#123 ·
Los mantenedores suelen responder en 1 día
-
p:3-mid pydanty:bug pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
pydantic/pydantic-ai#10153 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
good first issue priority: medium size: S testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
cubrid-lab/cubrid-cookbook-python#316 ·
Los mantenedores suelen responder en 1 día