NativeScript / NativeScript/nativescript-cli

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

未关闭
#2,577 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug plugins severity: low
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

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"
},

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用依赖项 "nativescript-drop-down": "file:../bin/dist" 和 tns plugin remove tns-core-modules 在 NativeScript-Drop-Down/demo 中重现该故障。首先跟踪 tns plugin add/remove 如何处理基于文件的依赖项。两个命令都能在不出现 npm ENOENT 错误的情况下运行即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。