Iron Router / Blaze的问题

时间:2014-08-20 11:32:47

标签: meteor iron-router

我一直在尝试使用Iron Router,但我收到了这个错误。看起来像blaze-layout包是个问题。

enter image description here

我想我需要删除blaze-layout包。我试过这样做,但我明白了:

$ ls
accounts-t9n  blaze-layout  font-awesome-4-less  less-bootstrap-3  simple-form    underscore-string-latest
autoform      collection2   iron-router          moment            simple-schema
graeme@ubuntu:~/bootstrapApp/packages$ meteor remove blaze-layout
blaze-layout: not in project

很清楚,但我注意到smart.json或smart.lock文件中没有引用它。我尝试将blaze-layout的目录名更改为不同的内容,以查看是否可行,但事实并非如此。

我应该删除blaze-layout包吗?如果是这样,我该如何正确地做到这一点?

My Meteor版本:

$ meteor --version
Release 0.8.3


        smart.json

    {
      "packages": {
        "less-bootstrap-3": {},
        "font-awesome-4-less": {},
        "autoform": {},
        "iron-router": "0.8.2"
      }
    }

    .meteor/packages

    standard-app-packages
    autopublish
    insecure
    less
    less-bootstrap-3
    font-awesome-4-less
    accounts-password
    accounts-ui
    accounts-twitter
    autoform
    collection2
    simple-schema


    smart.lock

    {
      "meteor": {},
      "dependencies": { 
        "basePackages": {
          "less-bootstrap-3": {},
          "font-awesome-4-less": {},
          "autoform": {},
          "iron-router": {
            "version": "0.8.2"
          }
        },
        "packages": {
          "less-bootstrap-3": {
            "git": "https://github.com/DerMambo/less-bootstrap-3.git",
            "tag": "v0.0.2",
            "commit": "b5010b2ff9e9ae6b0e6e13eb0f6c81c9cb84373e"
          },
          "font-awesome-4-less": {
            "git": "https://github.com/svub/fontawesome4-less.git",
            "tag": "v4.4.0",
            "commit": "250d2336a217c18eb70e9d074784a7db3ca38472"
          },
          "autoform": {
            "git": "https://github.com/aldeed/meteor-autoform.git",
            "tag": "v0.17.1",
            "commit": "a4688e7d77019a68ef43c2a303e905748beeb860"
          },
          "simple-schema": {
            "git": "https://github.com/aldeed/meteor-simple-schema.git",
            "tag": "v0.7.0",
            "commit": "77d267aec4ba8a70f677e5d9ef9fb91fb0e3f0f6"
          },
          "collection2": {
            "git": "https://github.com/aldeed/meteor-collection2.git",
            "tag": "v0.4.6",
            "commit": "80554182486be0d8e74f7ed02194a5649d712e27"
          },
          "moment": {
            "git": "https://github.com/acreeger/meteor-moment.git",
            "tag": "v2.8.1",
            "commit": "722ea63783d594341023836b7d418ab2567dab8c"
          }
        }
      }
    }

2 个答案:

答案 0 :(得分:1)

看起来你有一个过时的铁路由器版本。通常你会运行mrt update,但由于IR 0.9与Meteor 0.8.3不兼容,已经在Atmosphere上,你应该更新smart.json。

在你的smart.json文件中找到这一行:

"iron-router": {},

并将其替换为:

"iron-router": "0.8.2",

如果{}对象中有某些内容,请不要担心,只需删除它即可。

之后,运行mrt应该有效。


如果问题仍然存在,请转到~/.meteorite/packages并移除blaze-layoutiron-router和所有iron-*个文件夹。然后从项目/packages文件夹中删除现在已停止的链接并运行mrt install。这将确保您使用的依赖项版本是IR 0.8.2所需的版本。

答案 1 :(得分:1)

您需要在项目根目录中删除软件包。

$ cd ~/bootstrapApp
$ mrt remove blaze-layout