Error after upgrading to 1.9.6 "onAfterRemove" is read-only
See original GitHub issueHi! After upgrade to Meteor 1.6, I upgraded all packages (meteor and npm) but it seems that something got wrong with ostrio:files. The files collection was working just fine, this started after upgrade.
ostrio:files@1.9.6 METEOR@1.6.0.1 Server Issue
Error log:
=> Errors prevented startup:
While building for web.browser: imports/api/Images/Images.js:1:94: imports/api/Images/Images.js: “onAfterRemove” is read-only
While building for os.linux.x86_64: imports/api/Images/Images.js:1:94: imports/api/Images/Images.js: “onAfterRemove” is read-only
=> Your application has errors. Waiting for file change.
Files Collection Class:
import { Meteor } from 'meteor/meteor';
import { FilesCollection } from 'meteor/ostrio:files';
const Images = new FilesCollection({
debug: true,
throttle: false,
storagePath: () => `${Meteor.absolutePath}/uploads`,
downloadRoute: '/uploads',
collectionName: 'Images',
allowClientCode: false,
onbeforeunloadMessage() {
return 'Upload is still in progress! Upload will be aborted if you leave this page!';
},
...
...
...
onAfterRemove(cursor) {
import { onAfterRemove } from '../../modules/server/upload-files';
onAfterRemove(cursor);
},
...
...
...
});
export default Images;
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Error after upgrading to 1.9.6 "onAfterRemove" is read-only · Issue ...
Hi! After upgrade to Meteor 1.6, I upgraded all packages (meteor and npm) but it seems that something got wrong with ostrio:files. The...
Read more >Serenity Guide | PDF | Microsoft Sql Server - Scribd
We hope that after installing and using it ... (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred.
Read more >Serenity Developer Guide - UserManual.wiki
Table of Contents Introduction 1.1 Getting Started 1.2 Installing Serene From Visual Studio Marketplace 1.2.1 Installing Serene Directly From Visual Studio ...
Read more >Thinkphp6 (tp6) update notes
Use admin application , When adding an entry file name admin, ... 1)->findOrFail(); // An exception is returned after failure.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @dr-dimitru !
I got it woring by splitting code like the demo you mentioned!
thanks!
@mgscreativa awesome, I’m glad it’s working for you 😄 IMHO exact code splitting much better, than conditional
requireorimportstatements.