【发布时间】:2015-08-08 14:46:50
【问题描述】:
在我的 packages.json 文件中,我有:
{
"sendwithus":"git+https://git@github.com/whalepath/sendwithus_nodejs.git#enable_testing_server"
}
因为我需要使用分叉(和固定版本的库)。上述语法适用于直节点。如何在流星中做到这一点?
这是我得到的错误:
=> Started proxy.
=> Errors prevented startup:
While reading package from `src/packages/npm-container`:
package.js:14:7: must declare exact version of dependency:
sendwithus@git+https://git@github.com/whalepath/sendwithus_nodejs.git#enable_testing_server
更新:
我尝试删除该行并使用流星添加来获取包含的包:
失败:
meteor add sendwithus@2.9.1@https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4
=> Errors while parsing arguments:
While adding package sendwithus@2.9.1@https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4:
error: Package names can only contain lowercase ASCII alphanumerics, dash, dot, or colon, not "@".
失败:
$ meteor add sendwithus@2.9.1_https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4
=> Errors while parsing arguments:
While adding package sendwithus@2.9.1_https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4:
error: Can't have two _ in version: 2.9.1_https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4
失败:
$ meteor add server:sendwithus@2.9.1@https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4
=> Errors while parsing arguments:
While adding package server:sendwithus@2.9.1@https://github.com/whalepath/sendwithus_nodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4:
error: Package names can only contain lowercase ASCII alphanumerics, dash, dot, or colon, not "@".
失败:
$ meteor add sendwithus@https://github.com/whalepath/sendwithusnodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4
=> Errors while parsing arguments:
While adding package sendwithus@https://github.com/whalepath/sendwithusnodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4:
error: Version string must look like semver (eg '1.2.3'), not 'https://github.com/whalepath/sendwithusnodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4'.
【问题讨论】:
-
你在用
meteorhacks:npm包吗? -
是的,我是。那是负责错误消息的代码。 (但看起来负责的代码在 c 而不是 js 中)