Skip to content

[BUG] can't install with --install-strategy=linked #8204

Open
@abdheshnayak

Description

@abdheshnayak

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

npm i --install-strategy=linked

with above command getting this error

npm warn reify The "linked" install strategy is EXPERIMENTAL and may contain bugs.
npm error Cannot read properties of undefined (reading 'path')
npm error A complete log of this run can be found in: /home/vision/.npm/_logs/2025-04-02T04_34_44_913Z-debug-0.log

Expected Behavior

it should install the deps with linked strategy.

Steps To Reproduce

directory structure

.
├── dep1
│   └── package.json
├── dep2
│   ├── dep3
│   │   └── package.json
│   ├── dep4
│   │   └── package.json
│   └── package.json
└── package.json

./package.json

{
  "name": "main",
  "dependencies": {
    "dep1": "file:dep1",
    "dep2": "file:dep2"
  }
}

./dep2/package.json

{
  "name": "dep2",
  "dependencies": {
    "dep3": "file:dep3"
  },
  "devDependencies": {
    "dep4": "file:dep4"
  }
}

./dep2/dep3/package.json

{
  "name": "dep3"
}

./dep2/dep4/package.json

{
  "name": "dep4"
}

./dep1/package.json

{
  "name": "dep1"
}

So with this config run

npm i --install-strategy=linked

which will give error:

npm warn reify The "linked" install strategy is EXPERIMENTAL and may contain bugs.
npm error Cannot read properties of undefined (reading 'path')
npm error A complete log of this run can be found in: /home/vision/.npm/_logs/2025-04-02T04_44_15_948Z-debug-0.log

Environment

  • npm: 11.2.0
  • Node.js: v23.9.0
  • OS Name: Arch Linux x86_64
  • System Model Name: ProArt Studiobook H7600ZM_H7600ZM 1.0
  • npm config:
; "user" config from /home/vision/.npmrc

//npm.pkg.github.com/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)

; node bin location = /usr/bin/node
; node version = v23.9.0
; npm local prefix = /home/vision/workplace/tmp
; npm version = 11.2.0
; cwd = /home/vision/workplace/tmp
; HOME = /home/vision
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions