question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error after upgrading to 1.9.6 "onAfterRemove" is read-only

See original GitHub 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 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:closed
  • Created 6 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mgscreativacommented, Jan 23, 2018

Thanks @dr-dimitru !

I got it woring by splitting code like the demo you mentioned!

thanks!

0reactions
dr-dimitrucommented, Jan 23, 2018

@mgscreativa awesome, I’m glad it’s working for you 😄 IMHO exact code splitting much better, than conditional require or import statements.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found