can not add local package
envgap__lerna__lerna-1953
Original GitHub issue ↗Opened 2019-03-04
01 / FAILURE SIGNATURE
As reported upstream
"test": "echo \"Error: no test specified\" && exit 1"
Not a benchmark task.
- 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 #1953 · read the original issue
<!--- I can not add local package -->
## Expected Behavior
when i run
```bash
lerna add module-0 --scope=module-1
```
it should link to module-1
## Current Behavior
but npm is output error message, it tell me
```log
lerna notice cli v3.13.1
lerna info filter [ 'module-1' ]
lerna info Adding module-0 in 1 package
lerna notice filter including "module-1"
lerna info filter [ 'module-1' ]
lerna WARN bootstrap Installing local packages that do not match filters from registry
lerna info Bootstrapping 1 package
lerna info Installing external dependencies
lerna ERR! npm install --no-save exited 1 in 'module-1'
lerna ERR! npm install --no-save stderr:
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for module-0
```
but when i run
```bash
lerna add module-0
```
it linked others successfully
<details><summary>lerna.json</summary><p>
<!-- browsers demand the next line be empty -->
```json
{
"packages": [
"packages/*"
],
"version": "1.0.0"
}
```
</p></details>
<details><summary>module-0/package.json</summary><p>
<!-- browsers demand the next line be empty -->
```json
{
"name": "module-0",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
```
</p></details>
<details><summary>module-1/package.json</summary><p>
<!-- browsers demand the next line be empty -->
```json
{
"name": "module-1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"module-0": "1.0.0"
}
}
```
</p></details>
## file tree
```text
├── lerna.json
├── package.json
└── packages
├── module-0
│ ├── index.js
│ └── package.json
├── module-1
│ ├── index.js
│ └── package.json
└── module-2
├── index.js
└── package.json
```
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
| Executable | Version |
| ---: | :--- |
| `lerna --version` | 3.13.1 |
| `npm --version` | 6.4.1 |
| `node --version` | 8.12.0 |
| OS | Version |
| --- | --- |
| macOS Sierra | 10.12.1 |
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.