在 Meteor 上安装本地包 [英] Installing a local package on Meteor

查看:19
本文介绍了在 Meteor 上安装本地包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Meteor 上运行本地包.

I'm trying to run a local package on Meteor.

我有一个正确的 package.js,有一个 smart.json,它在我的 Meteor 项目的/packages 目录中.我项目中的 smart.json 如下所示:

I've got a correct package.js, have a smart.json, and it's inside my /packages directory in my Meteor project. The smart.json at my project looks like this:

{ 
    "packages": {
        "router": {},
        "userErrors": {
            "path": "/home/user/Documents/project/packages/userErrors" 
        }
    }
}

我正在使用 api.add_files 并且一切正常.当我将它从包文件夹中取出时,代码运行良好.为了使这个包运行,我缺少什么吗?我正在使用 mrt 命令运行 Meteor.

And I am using api.add_files and all correctly. The code runs fine when I take it out of the packages folder. Is there something I'm missing in order to make this package run? I'm running Meteor with the mrt command.

推荐答案

尝试将您的文件放在您的应用程序的 'packages' 目录中并执行:流星添加[包名]

try to put your files in the 'packages' directory of your app and execute : meteor add [package-name]

这篇关于在 Meteor 上安装本地包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆