NativeScript / NativeScript/nativescript-cli

`tns plugin add/remove` fails if there is dependency referenced as file

Open
#2,577 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug plugins severity: low
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Steps to reproduce:

git clone https://github.com/PeterStaev/NativeScript-Drop-Down
cd NativeScript-Drop-Down/demo
tns plugin remove tns-core-modules 

Result:

npm ERR! addLocal Could not install /Users/topuzov/Git/nativescript-cli-tests/NativeScript-Drop-Down/bin/dist
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node@6/6.9.5/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! path /Users/topuzov/Git/nativescript-cli-tests/NativeScript-Drop-Down/bin/dist
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/Users/topuzov/Git/nativescript-cli-tests/NativeScript-Drop-Down/bin/dist'
npm ERR! enoent ENOENT: no such file or directory, open '/Users/topuzov/Git/nativescript-cli-tests/NativeScript-Drop-Down/bin/dist'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/topuzov/Git/nativescript-cli-tests/NativeScript-Drop-Down/demo/npm-debug.log

tns plugin add/remove fails if you have another dependency referenced with path:

"dependencies": {
  "nativescript-drop-down": "file:../bin/dist",
  "tns-core-modules": "^2.5.0"
},

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in NativeScript-Drop-Down/demo using the dependency "nativescript-drop-down": "file:../bin/dist" and tns plugin remove tns-core-modules. Start by tracing how tns plugin add/remove handles file-based dependencies. Done means both commands work without the npm ENOENT error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.