From aa45edeafbf37c5638378cd92d0aa7cc954d426c Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Fri, 19 Mar 2021 17:52:01 +0100 Subject: [PATCH] docs(pipelines): document multiple NPM versions issue (#13687) NPM6 can apparently not correctly process a package-lock generated using NPM7. This will crop up more and more as NPM 7 starts becoming more popular; add a documentation section about this. Fixes #13666. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/pipelines/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/@aws-cdk/pipelines/README.md b/packages/@aws-cdk/pipelines/README.md index 5413b38fa0d16..6097c87c16426 100644 --- a/packages/@aws-cdk/pipelines/README.md +++ b/packages/@aws-cdk/pipelines/README.md @@ -749,6 +749,18 @@ ID: ...) The stack failed its previous deployment, and is in a non-retryable state. Go into the CloudFormation console, delete the stack, and retry the deployment. +### Cannot find module 'xxxx' or its corresponding type declarations + +You may see this if you are using TypeScript or other NPM-based languages, +when using NPM 7 on your workstation (where you generate `package-lock.json`) +and NPM 6 on the CodeBuild image used for synthesizing. + +It looks like NPM 7 has started writing less information to `package-lock.json`, +leading NPM 6 reading that same file to not install all required packages anymore. + +Make sure you are using the same NPM version everywhere, either downgrade your +workstation's version or upgrade the CodeBuild version. + ## Current Limitations Limitations that we are aware of and will address: