简体   繁体   English

错误:Meteor应用程序的顶级依赖项中的未知程序包

[英]Error: unknown package in top-level dependencies in Meteor app

I'm making a small Meteor package. 我正在制作一个小的流星包。 It employs two other packages that are explicitly listed in its package.js . 它采用了package.js中明确列出的其他两个软件包。 For test purposes, I add this package from local system (it's not published on Atmosphere). 出于测试目的,我从本地系统添加了此程序包(该程序包未在Atmosphere上发布)。 And I keep getting error messages after I run the app: 运行应用程序后,我不断收到错误消息:

=> Started proxy.                             
=> Started MongoDB.                           
=> Errors prevented startup:                  

   While selecting package versions:
   error: unknown package in top-level dependencies: whoever:whatever

I even added required packages explicitly to the app but it didn't help. 我什至将必需的程序包显式添加到应用程序中,但没有帮助。

The package.js : package.js

Package.describe({
    name: 'whoever:whatever',
    version: '0.0.1',
    summary: 'Whatever the summary is',
    git: 'https://github.com/whoever/whatever',
    documentation: 'README.md'
});

Package.onUse(function(api) {
    api.versionsFrom('1.1.0.3');
    api.use('http');
    api.use('jparker:crypto-sha1', 'server');
    api.use('simple:reactive-method', 'client');
    api.addFiles('for-a-server.js', 'server');
    api.addFiles([
        'for-a-client.js',
        'for-a-client.html'
    ], 'client');
});

What am I doing wrong? 我究竟做错了什么? What should I look for next? 接下来我应该找什么?

As was mentioned in your comments, it was due to a problem with symlinking. 正如您在评论中提到的,这是由于符号链接问题。 However, for googlers who come by developing their own meteor packages and also getting this message -- they need to check their env vars have $PACKAGE_DIRS defined in the terminal calling meteor to start their app. 但是,对于通过开发自己的流星程序包并收到此消息的Google员工来说,他们需要检查其环境变量在调用meteor的终端中定义了$PACKAGE_DIRS以启动其应用。

I didn't and this caused the same problem! 我没有,这引起了同样的问题!

Make sure to both init and update your submodules. 确保同时初始化和更新您的子模块。 This should work: 应该工作:

git submodule update --init --recursive

Can you please try and replace the single quotes with double quotes and try... something like below. 您可以尝试将单引号替换为双引号,然后尝试...类似于以下内容。 Please type the quotes. 请输入引号。

Package.describe({
    name: "whoever:whatever",
    version: "0.0.1",
    summary: "Whatever the summary is",
    git: "https://github.com/whoever/whatever",
    documentation: "README.md"
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM