Content-Length: 293634 | pFad | https://github.com/npm/cli/issues/8302

2B [BUG] Install dependency from file creates wrong link · Issue #8302 · npm/cli · GitHub
Skip to content

[BUG] Install dependency from file creates wrong link #8302

@AndrewLugg

Description

@AndrewLugg

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

In 11.4 I run NPM install, and one of my packages is a local file one. It will install it, but the symbolic link goes to the wrong location.

Line in package.json:

"microservice-error": "file:../microservice-common/microservice-error",

Symbolic link created inside node_modules:
microservice-error -> ../microservice-error

Which does not lead to the repo.

Expected Behavior

Line in package.json:

"microservice-error": "file:../microservice-common/microservice-error",

Symbolic link should be which points to correct location:
microservice-error -> ../../microservice-common/microservice-error

This code works in 11.3

Steps To Reproduce

Create a package.json file that pulls a local file package.

Use multiple folder-level changes, run install, and see a symbolic link pointing to nothing.

Environment

  • npm: 11.4.0
  • Node.js: 22
  • OS Name: Alpine
  • Docker image node:22-alpine

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingNeeds Triageneeds review for next steps

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/npm/cli/issues/8302

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy