Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecation error with Meteor 1.2-rc.11 #95

Open
ghost opened this issue Sep 3, 2015 · 11 comments
Open

Deprecation error with Meteor 1.2-rc.11 #95

ghost opened this issue Sep 3, 2015 · 11 comments

Comments

@ghost
Copy link

ghost commented Sep 3, 2015

Trying to upgrade from rc10 to rc11 results in the following error:

[[[[[ app ]]]]]

=> Started proxy.                             
=> Errors prevented startup:                  

   While reading package from `...../app/packages/npm-container`:
   package.js:23:7: The `isAsset` option to `addFiles` is deprecated. Use PackageAPI#addAssets instead.

=> Your application has errors. Waiting for file change.
=> Started MongoDB.  
@jasonxeno
Copy link

Getting the same error.

@adam-r-kowalski
Copy link

There is an easy fix, you just need to update the call like described in the error.

// packages/npm-container/package.js - OLD VERSION
Package.onUse(function(api) {
  api.add_files('index.js', 'server');
  api.add_files('../../packages.json', 'server', {
    isAsset: true
  });
});
// packages/npm-container/package.js - NEW VERSION
Package.onUse(function(api) {
  api.add_files('index.js', 'server');
  api.addAssets('../../packages.json', 'server');
});

@arunoda
Copy link
Member

arunoda commented Sep 4, 2015

I published a updated version for this. Simply updating meteorhacks:npm won't work here. Need to follow these steps.

rm -rf packages/npm-container
meteor remove npm-container
meteor update meteorhacks:npm
meteor

Basically, it removes the npm-container and then update meteorhacks:npm

@stubailo
Copy link

stubailo commented Sep 4, 2015

Oops! Didn't realize this would break things. Sorry about that.

@arunoda
Copy link
Member

arunoda commented Sep 4, 2015

That's fine. Anyway, we have to update it :)

@lorensr
Copy link

lorensr commented Sep 23, 2015

Those steps fit it for me, thanks!

@derwaldgeist
Copy link

Stumbled upon this issue. I think the Meteor upgrade guide should be updated. In this guide, it says:
Package authors must make this change to their package.js files before they can publish from Meteor 1.2, but existing published packages will continue to work.
Obviously, this is not the case for all packages.

@jacobdr
Copy link

jacobdr commented Oct 26, 2015

+1 for resolution provided by @arunoda

@bmustata
Copy link

+1

@stubailo
Copy link

This shouldn't be the case in meteor 1.2.1 anymore.

@bmustata
Copy link

It's working in meteor 1.2.1.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants