gpt4 book ai didi

javascript - 指定 Meteor 包依赖项的正确方法

转载 作者:行者123 更新时间:2023-12-03 12:36:30 27 4
gpt4 key购买 nike

我正在尝试创建一个依赖于另一个 meteor 包的新 meteor 包。当我尝试 meteor add mypackage 时,出现以下错误。为什么 Meteor 不添加 mypackage 并引入它的依赖项?

=> Errors while scanning packages:While building package 'mypackage':error: no such package: 'aloha-editor'

Here are the package.js and smart.json files from mypackage.

package.js

Package.describe({
summary: "REPLACEME - What does this package (or the original one you're wrapping) do?"
});

Package.on_use(function (api, where) {
api.add_files('package1.js', ['client', 'server']);
});

Package.on_test(function (api) {
api.use('aloha-editor', 'client');
api.use('package1', 'client');

api.add_files('package1_tests.js', 'client');
});

智能.json

{
"name": "package1",
"description": "REPLACEME - What does this package (or the original one you're wrapping) do?",
"homepage": "",
"author": "Your Name <your@email> (http://yoursite)",
"version": "0.0.1",
"git": "",
"packages": {
"aloha-editor": {}
}
}

最佳答案

您的依赖关系似乎定义正确。但是,您需要运行 mrt add mypackage 而不是 meteor add mypackage。第二个命令仅使用 Meteor 提供的软件包,而 mrt 可以访问您尝试使用的整个 Atmosphere 存储库。

关于javascript - 指定 Meteor 包依赖项的正确方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23713893/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com