aws / aws/aws-pdk

[BUG] Failed to run `npm ci` command

Open
#902 3 comments 2 reactions 0 assignees View on GitHub
backlog bug needs-triage
Dominant language
TypeScript
Stars
451
Forks
84
Avg merge
20h 3m
Merged PRs (30d)
1

Description

### Describe the bug

`npm ci` command execution fails.

```shell
% npm ci
npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm error
npm error Missing: execa@0.1.2 from lock file
npm error Missing: @pnpm/logger@5.2.0 from lock file
npm error Missing: js-yaml@0.0.6 from lock file
npm error Missing: bole@5.0.17 from lock file
npm error Missing: ndjson@2.0.0 from lock file
npm error Missing: fast-safe-stringify@2.1.1 from lock file
npm error Missing: individual@3.0.0 from lock file
npm error Missing: json-stringify-safe@5.0.1 from lock file
npm error Missing: readable-stream@3.6.2 from lock file
npm error Missing: split2@3.2.2 from lock file
npm error Missing: through2@4.0.2 from lock file
npm error Missing: inherits@2.0.4 from lock file
npm error Missing: string_decoder@1.3.0 from lock file
npm error Missing: util-deprecate@1.0.2 from lock file
npm error Missing: safe-buffer@5.2.1 from lock file
npm error Missing: path-is-absolute@1.0.1 from lock file
npm error Missing: concat-map@0.0.1 from lock file
npm error Missing: is-arrayish@0.2.1 from lock file
npm error Missing: type-fest@0.6.0 from lock file
npm error Missing: mimic-fn@3.1.0 from lock file
npm error Missing: hosted-git-info@6.1.3 from lock file
npm error Missing: p-limit@2.3.0 from lock file
npm error Missing: lines-and-columns@1.2.4 from lock file
npm error Missing: normalize-package-data@2.5.0 from lock file
npm error Missing: type-fest@0.6.0 from lock file
npm error Missing: glob@7.2.3 from lock file
npm error Missing: fs-extra@8.1.0 from lock file
npm error Missing: arg@4.1.3 from lock file
npm error Missing: signal-exit@4.1.0 from lock file
npm error Missing: @zkochan/which@2.0.3 from lock file
npm error Missing: execa@5.1.1 from lock file
npm error Missing: path-name@1.0.0 from lock file
npm error Missing: lru-cache@7.18.3 from lock file
npm error Missing: p-try@2.2.0 from lock file
npm error Missing: hosted-git-info@2.8.9 from lock file
npm error Missing: resolve@1.22.10 from lock file
npm error Missing: semver@5.7.2 from lock file
npm error Missing: is-core-module@2.16.1 from lock file
npm error Missing: path-parse@1.0.7 from lock file
npm error Missing: supports-preserve-symlinks-flag@1.0.0 from lock file
npm error Missing: hasown@2.0.2 from lock file
npm error Missing: function-bind@1.1.2 from lock file
npm error Missing: minimatch@3.1.2 from lock file
npm error Missing: brace-expansion@1.1.11 from lock file
npm error Missing: jsonfile@4.0.0 from lock file
npm error Missing: universalify@0.1.2 from lock file
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy ] [--legacy-bundling]
npm error [--global-style] [--omit [--omit ...]]
npm error [--include [--include ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace [-w|--workspace ...]]
npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info
npm error A complete log of this run can be found in: /xxxxx/.npm/_logs/2025-02-06T01_11_40_375Z-debug-0.log
```

### Expected Behavior

I expect npm ci to run without any issues.

### Current Behavior

Run npm ci.

### Reproduction Steps

Run npm ci.

### Possible Solution

I haven't looked into the specific cause, but it seems that it may be due to the creation of a symbolic link using @pnpm/reviewing.dependency-hierarchy, or the lack of a package-lock.json when using pnpm as the package manager.

### Additional Information/Context

_No response_

### PDK version used

0.25.16

### What languages are you seeing this issue on?

_No response_

### Environment details (OS name and version, etc.)

MacOS 15.2

Contributor guide

Open the contributing guide

Research direction

Start by checking the repository's package.json and package-lock.json or npm-shrinkwrap.json, then run npm ci to reproduce the lock-file mismatch. Trace why the listed dependencies are missing from the lock file; done means a clean npm ci completes successfully on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.