Skip to content

Migrations are failing because the repository must be installed with npm i -f #33942

@danielritter

Description

@danielritter

Current Behavior

I have a repository where packages must be installed using npm i -f. When running migrations, they fail because the pre-migration installation process does not use the force flag.

Expected Behavior

nx migrate --run-migrations should support a --force flag to force the npm installation process, or it should do so by default so that the migrations process does also work for repositories that must be installed with npm i -f.

GitHub Repo

No response

Steps to Reproduce

  1. repo that has to be installed with npm i -f
  2. run nx migrate --run-migrations
  3. migrations fails

Nx Report

Node           : 24.11.0
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 11.6.2

nx (global)            : 22.3.1
nx                     : 22.3.1
@nx/js                 : 22.3.1
@nx/eslint             : 22.3.1
@nx/workspace          : 22.3.1
@nx/angular            : 22.3.1
@nx/jest               : 22.3.1
@nx/cypress            : 22.3.1
@nx/devkit             : 22.3.1
@nx/eslint-plugin      : 22.3.1
@nx/module-federation  : 22.3.1
@nx/nest               : 22.3.1
@nx/node               : 22.3.1
@nx/plugin             : 22.3.1
@nx/rspack             : 22.3.1
@nx/storybook          : 22.3.1
@nx/web                : 22.3.1
@nx/webpack            : 22.3.1
@nx/docker             : 22.3.1
typescript             : 5.9.3
---------------------------------------
Registered Plugins:
@workspace/targets
@workspace/schematics
@nx/webpack/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
@compodoc/compodoc   : 1.1.32
@ng-doc/builder      : 20.1.1
@ngrx/effects        : 20.1.0
@ngrx/entity         : 20.1.0
@ngrx/operators      : 20.1.0
@ngrx/router-store   : 20.1.0
@ngrx/schematics     : 20.1.0
@ngrx/signals        : 20.1.0
@ngrx/store          : 20.1.0
@ngrx/store-devtools : 20.1.0
@storybook/angular   : 10.0.8
angular-eslint       : 21.0.1
---------------------------------------
Local workspace plugins:
@workspace/schematics
---------------------------------------
Cache Usage: 0.00 B / 95.19 GB

Failure Logs

Package Manager Version

npm 11.6.2

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

Labels

priority: lowLow Priority (does not affect many people or not severely or has an easy workaround)scope: corecore nx functionalitytype: bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions