【问题标题】:Meteor 0.9.0.1: simple-schema not found after installing CollectionFS and cfs:filesystemMeteor 0.9.0.1:安装 CollectionFS 和 cfs:filesystem 后找不到简单模式
【发布时间】:2025-12-07 07:15:02
【问题描述】:

我想在我的项目上安装CollectionFScfs:filesystem,因为我想上传文件。我已将 collectionfs 和 cfs-filesystem 添加到我的 smart.json 文件中,并进行了 mrt 更新。软件包似乎安装正常,但是当我尝试运行我的应用程序时,出现错误“错误:未知软件包:简单模式”。我知道这个包在我尝试安装这两个新包之前运行良好,因为它运行良好。

我检查了我的包文件夹,简单模式肯定在那里。

有人知道如何让简单模式再次工作吗?

smart.json:

{
  "packages": {
  "collectionfs": {},
  "cfs-filesystem": {},
  "simple-schema": {},
  "collection2": {},
  "autoform": {},
  "iron-router": "0.8.2",
  "less-bootstrap-3": {},
  "font-awesome-4-less": {},
  "npm": {},
  "fs": {},
  "roles": {},
  "accounts-ui-bootstrap-3": {},
  "accounts-admin-ui-bootstrap-3": {}
  }
}

终端输出:

$ mrt update
✓ data-man
branch: https://github.com/CollectionFS/Meteor-data-man.git#master
✓ collectionfs
tag: https://github.com/CollectionFS/Meteor-CollectionFS.git#v0.4.9
✓ cfs-filesystem
tag: https://github.com/CollectionFS/Meteor-cfs-filesystem.git#v0.0.28
✓ simple-schema
tag: https://github.com/aldeed/meteor-simple-schema.git#v1.0.2
✓ collection2
tag: https://github.com/aldeed/meteor-collection2.git#v0.4.6
✓ autoform
tag: https://github.com/aldeed/meteor-autoform.git#v1.0.0
✓ iron-router
tag: https://github.com/EventedMind/iron-router.git#v0.8.2
✓ less-bootstrap-3
tag: https://github.com/DerMambo/less-bootstrap-3.git#v0.0.2
✓ font-awesome-4-less
tag: https://github.com/svub/fontawesome4-less.git#v4.4.0
✓ npm
tag: https://github.com/arunoda/meteor-npm.git#v0.2.6
✓ fs
tag: https://github.com/peerlibrary/meteor-fs.git#v0.1.4
✓ roles
tag: https://github.com/alanning/meteor-roles.git#v1.2.11
✓ accounts-ui-bootstrap-3
tag: https://github.com/mangasocial/meteor-accounts-ui-bootstrap-3.git#v0.3.5
✓ accounts-admin-ui-bootstrap-3
tag: https://github.com/hharnisc/meteor-accounts-admin-ui-bootstrap-3.git#v0.2.6
✓ cfs-base-package
tag: https://github.com/CollectionFS/Meteor-cfs-base-package.git#v0.0.25
✓ cfs-file
tag: https://github.com/CollectionFS/Meteor-cfs-file.git#v0.1.13
✓ cfs-collection
tag: https://github.com/CollectionFS/Meteor-cfs-collection.git#v0.4.13
✓ cfs-collection-filters
tag: https://github.com/CollectionFS/Meteor-cfs-collection-filters.git#v0.1.3
✓ cfs-access-point
tag: https://github.com/CollectionFS/Meteor-cfs-access-point.git#v0.0.39
✓ cfs-worker
tag: https://github.com/CollectionFS/Meteor-cfs-worker.git#v0.0.20
✓ cfs-upload-http
tag: https://github.com/CollectionFS/Meteor-cfs-upload-http.git#v0.0.15
✓ cfs-storage-adapter
tag: https://github.com/CollectionFS/Meteor-cfs-storage-adapter.git#v0.0.31
✓ moment
tag: https://github.com/acreeger/meteor-moment.git#v2.8.1
✓ iron-layout
tag: https://github.com/EventedMind/iron-layout.git#v0.2.0
✓ assert
tag: https://github.com/peerlibrary/meteor-assert.git#v0.2.4
✓ blocking
tag: https://github.com/peerlibrary/meteor-blocking.git#v0.4.1
✓ cfs-filesaver
tag: https://github.com/CollectionFS/Meteor-cfs-filesaver.git#v0.0.4
✓ http-methods
tag: https://github.com/CollectionFS/Meteor-http-methods.git#v0.0.23
✓ numeral
tag: https://github.com/vsivsi/meteor-numeral.git#v1.5.3
✓ emitter
tag: https://github.com/Meteor-Reaction/meteor-emitter.git#v0.1.0
✓ cfs-upload-ddp
tag: https://github.com/CollectionFS/Meteor-cfs-upload-ddp.git#v0.0.12
✓ cfs-tempstore
tag: https://github.com/CollectionFS/Meteor-cfs-tempstore.git#v0.0.29
✓ http-publish
tag: https://github.com/CollectionFS/Meteor-http-publish.git#v0.0.10
✓ cfs-gridfs
tag: https://github.com/CollectionFS/Meteor-cfs-gridfs.git#v0.0.24
✓ power-queue
tag: https://github.com/CollectionFS/Meteor-power-queue.git#v0.9.9
✓ reactive-list
tag: https://github.com/CollectionFS/Meteor-reactive-list.git#v0.0.7
✓ cfs-graphicsmagick
tag: https://github.com/CollectionFS/Meteor-cfs-graphicsmagick.git#v0.0.15
✓ blaze-layout
tag: https://github.com/EventedMind/blaze-layout.git#v0.2.5
✓ iron-core
tag: https://github.com/EventedMind/iron-core.git#v0.2.0
✓ iron-dynamic-template
tag: https://github.com/EventedMind/iron-dynamic-template.git#v0.2.1
✓ cfs-ejson-file
tag: https://github.com/CollectionFS/Meteor-cfs-ejson-file.git#v0.0.8
✓ reactive-property
tag: https://github.com/CollectionFS/Meteor-reactive-property.git#v0.0.1
✓ micro-queue
tag: https://github.com/CollectionFS/Meteor-micro-queue.git#v0.0.3

Done installing smart packages
me@ubuntu:~/myapp$ meteor
Figuring out the best package versions to use. This may take a moment.
Refreshing package metadata. This may take a moment.
Could not resolve the specified constraints for this project:
Error: unknown package: simple-schema
me@ubuntu:~/myapp$

【问题讨论】:

    标签: meteor


    【解决方案1】:

    在 Meteor 0.9 中,您不应该再使用 smart.json。

    相反,Meteor 引入了自己的打包系统,您现在可以通过以下方式安装包

    meteor add
    

    很多氛围包的名字都更新了,你可以在atmospherejs.com找到它们

    Checkout this excellent upgrade guide

    【讨论】: