[英]Local Meteor Package not found
I'm having trouble setting up my project to use a local meteor package instead of a "remote" one.我无法将我的项目设置为使用本地 meteor package 而不是“远程”项目。 The meteor package I'm trying to use locally is a copy of meteortesting:mocha (so I can put my own logs into it).
我尝试在本地使用的 meteor package 是meteortesting:mocha的副本(所以我可以将自己的日志放入其中)。
Here's what I've done:这是我所做的:
cp -r [PATH]/meteor-mocha **.**
cp -r [PATH]/meteor-mocha **.**
将 repo 复制到我的项目根文件夹中 But when I run "meteor add meteortesting:mocha" (which is the name of my local package in./meteor-mocha/package/package.js) it still adds the registered/online meteortesting:mocha package instead of finding my local one.但是当我运行“meteor add meteortesting:mocha”(这是我本地 package in./meteor-mocha/package/package.js 的名称)时,它仍然添加注册/在线流星测试:mocha package 而不是找到我本地的.
I also tried fooling around with the name of my local package (ie name:"meteortesting:mochalocal") to differentiate it, but when I ran meteor add meteortesting:mochalocal it gives the error "error: no such package"我还尝试使用本地 package 的名称(即名称:“meteortesting:mochalocal”)来区分它,但是当我运行 meteor add meteortesting:mochalocal 它给出错误“错误:没有这样的包”
Does anyone know why this may be the case?有谁知道为什么会这样? I based my set up on this article
我的设置基于这篇文章
I know I can also try to put it in./packages, but I wasn't sure how to approach that with this repo because it's more than just a package.js folder.我知道我也可以尝试将它放入 ./packages 中,但我不确定如何使用这个 repo来处理它,因为它不仅仅是一个 package.js 文件夹。
You can use the ./packages
folder inside your project.您可以使用项目中的
./packages
文件夹。 Copy the package folder inside this.复制其中的 package 文件夹。 Then you will have:
然后你将拥有:
./packages/meteortesting:mocha
Or you can use another folder to your packages.或者您可以使用另一个文件夹来存放您的包。 Example:
例子:
/home/my_packages
Then set this:然后设置这个:
METEOR_PACKAGE_DIRS=/home/my_packages
Then your package will be in this path:然后您的 package 将位于此路径中:
/home/my_packages/meteortesting:mocha
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.