Skip to content

[BUG] local transitive dependencies cannot be installed with --install-links=true #5733

@jkowalleck

Description

@jkowalleck

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

cannot install my project which has local transitive dependencies.
npm install crashes with an error message

Expected Behavior

i can install my project which has local transitive dependencies, all local packages are symlinked into the "node_modules" dir.

Steps To Reproduce

i am using this dummy project: https://github.com/CycloneDX/cyclonedx-node-npm/tree/main/demo/local-dependencies/project

  1. git clone https://github.com/CycloneDX/cyclonedx-node-npm.git
  2. cd demo/local-dependencies/project
  3. run npm i
  4. See error
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path /.../cyclonedx-node-npm/demo/local-dependencies/project/node_modules/my-local-b/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open '/.../cyclonedx-node-npm/demo/local-dependencies/project/node_modules/my-local-b/package.json'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent
    

Environment

  • npm: 9.0.0
  • Node.js: v16.18.0
  • OS Name: ubuntu 22.04
  • System Model Name: some old thinkpad
  • npm config:
; node bin location = /usr/bin/node
; node version = v16.18.0
; npm local prefix = /.../cyclonedx-node-npm/demo/local-dependencies/project
; npm version = 9.0.0
; cwd = /.../cyclonedx-node-npm/demo/local-dependencies/project/packages
; HOME = /home/...
; Run `npm config ls -l` to show all defaults.

additionally i had the reproducible steps running in a matrix:
see https://github.com/CycloneDX/cyclonedx-node-npm/actions/runs/3306123198

This setup worked as expected in a test matrix of npm{6,7,8} {windows,macos,ubuntu} node{14,16,18} (=27 passes)

This setup failed with a matrix of npm{9} {windows,macos,ubuntu} node{16,18} (=6 fails)

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 0will get attention right awayRelease 9.xwork is associated with a specific npm 9 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy