← All tasks
javascriptlerna/lerna #2834Not checked yet

npm install fails for a package added as dependency in another package

envgap__lerna__lerna-2834

Original GitHub issue ↗Opened 2021-02-26

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not checked yet.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

lerna/lerna #2834 · read the original issue
I have 2 services-serviceA and serviceB.  serviceA is added as a dev-dependency in serviceB



package.json of serviceB has



  "devDependencies": {

    "serverless-bundle": "^4.0.1",

    "serviceA": "^0.1.0"

  }

## Expected Behavior

npm install should install serverless-bundle and ignore serviceA



## Current Behavior

npm install fails with error



```

npm ERR! code E404

npm ERR! 404 Not Found - GET https://registry.npmjs.org/serviceA - Not found

npm ERR! 404

npm ERR! 404  'serviceA@^0.1.0' is not in the npm registry.

npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404 It was specified as a dependency of 'serviceA'

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

```

<!-- Please paste your `lerna.json` here -->

```

</p></details>

{

  "packages": ["lib/*", "services/*"],

  "version": "0.0.0.0",

  "useWorkspaces": true,

  "npmClient": "npm"

}



<details><summary>lerna-debug.log</summary><p>

<!-- browsers demand the next line be empty -->



```txt

<!-- If you have a `lerna-debug.log` available, please paste it here -->

<!-- Otherwise, feel free to delete this <details> block -->

```

</p></details>



## Context

<!--- How has this issue affected you? What are you trying to accomplish? -->

<!--- Providing context helps us come up with a solution that is most useful in the real world -->



## Your Environment

<!--- Include as many relevant details about the environment you experienced the bug in -->



| Executable | Version |

| ---: | :--- |

| `lerna --version` | VERSION |

| `npm --version`  | VERSION |

| `yarn --version` | VERSION |

| `node --version` | VERSION |



| OS | Version |

| --- | --- |

| NAME | VERSION |

<!-- For example:

| macOS Sierra | 10.12.3 |

| Windows 10 | 1607 |

| Ubuntu | 16.10 |

-->

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy already_works is install-only; proposed control still requires runtime verification.