I have a prouction vps with Meteor 1.3.4.4 and ostrio:files 1.6.5
This afternoon i tried to upgrade Meteor 1.4, which is brand new version. Your package ostrio:files was upgraded automatically as 1.6.6 while upgrading Meteor 1.4
After upgrade I got a error as below
TypeError: FilesCollection is not a function
at meteorInstall.imports.api.Images.lists.js (imports/api/Images/lists.js:38:14)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/MY_HOME_DIR/product/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.imports.api.Lib.accountsLib.js (/MY_HOME_DIR/product/programs/server/app/app.js:15098:217)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/MY_HOME_DIR/mapp/product/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.imports.api.Lib.index.js (/MY_HOME_DIR/product/programs/server/app/app.js:15166:287)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
/MY_HOME_DIR/product/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
Now I degrade Meteor 1.3.4.4 and set version constrain ostrio:files '1.6.5'. Then my production vps is now working correctly.
What previous version of ostrio:files was installed in your app? v1.6.6 has no codebase difference with 1.6.5, only dependencies update
Could you post content of lists.js, where is FilesCollection called?
If you use ES6 you need to import FilesCollection:
import { FilesCollection } from 'meteor/ostrio:files';
Meteor: 1.3.4.4
ostrio:files : 1.6.5
I guess I have to use ES6 import even for Meteor Atmosphere packages on Meteor 1.4 now.
I will try it later because it is production now.
A few lines on the top ( 'import' lines only ) in 'lists.js'
import { Meteor } from 'meteor/meteor'
import defaultSchema from './Schema.js'
.
.
.
@justinFather @dr-dimitru I had the same issue today. Turns out the problem is the coffeescript compiler!
Try this:
meteor add coffeescript@=1.1.4
Thank you @Torsten85
I will try it within today and leave the result here.
Reproduced on [email protected]
Looking for solution
HOT FIX:
Use Meteor.Files instead of FilesCollection.
Meteor.Files was left for compatibility a long time ago.
Currently somewhy api.export('FilesCollection'); not exporting FilesCollection
@dr-dimitru, take a time. Now my production vps is working well on Meteor 1.3.4.4 + ostrio:files 1.6.5. I will just wait for ostrio:files new version fits to Meteor 1.4.
Thank you.
@justinFather fixed, please check on your end
I upgraded my production vps to Meteor 1.4 with ostrio:files 1.6.7 successfully.
My vps is working fine now!
Thank you
Great news @justinFather
Thank you for reporting about this issue