【发布时间】:2019-02-28 01:34:36
【问题描述】:
我尝试设置我的环境来为react-draggable React 模块做出贡献。
开发人员在他的README.md 中有描述,但我被困在第二步:npm run dev。这运行 make dev 就像他在 package.json 中定义的一样。
我在控制台中得到这个输出:
PS D:\Projekte\module_dev\react-draggable> npm run dev
> react-draggable@3.0.5 dev D:\Projekte\module_dev\react-draggable
> make dev
make i info Invoking dev target
(node:1740) UnhandledPromiseRejectionWarning: undefined
(node:1740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
make × ERR not found: make-$(BIN)
我也尝试了以下命令:
- npm install make -g 安装 make
-
npm install --only=dev 在 pakage.json 中安装
devDependencies中定义的包
我在 Windows 10 环境中工作。
在我看来,make 无法解析 Makefile 中定义的 BIN:
export BIN := $(shell npm bin)
你知道我该如何继续这个吗?这对我会有很大的帮助。谢谢!
【问题讨论】:
-
听起来构建指令需要修复。如果存在缺陷,在该 GitHub 存储库中报告此问题可能会有所帮助。 github.com/mzabriskie/react-draggable/issues 你对
npm install make -g的额外建议已经对他们的自述文件做出了有价值的贡献。
标签: javascript node.js reactjs makefile package.json