Meteor import package

I use ms-seo package on my Meteor APP for generate title, desc, etc.

But, after import the package for add my config, i’ve error :

SEO is undefined

My /imports/startup/client/seoConfig.js

import { SEO } from 'meteor/manuelschoebel:ms-seo';



/**
* Description for startup
* @private
* @method startup
* @param {Object} function(
* @return {Object} description
*/
Meteor.startup( () => {

    SEO.config({
        ignore: {
            meta: ['fragment', 'viewport'],
            link: ['stylesheet', 'icon', 'apple-touch-icon']
        }
    });

});

Do you have any idea why i’ve this error ?

Thank you !

It looks like this package isn’t making use of api.export, in other words it’s not exporting the SEO object. Instead, it’s being set directly on the window object in seo.coffee: @SEO = SEO.

I haven’t tested this, but perhaps try changing your import to the following so it doesn’t mask the global SEO object with the local import:

import 'meteor/manuelschoebel:ms-seo';
1 Like

Thank you @nathantreid, the error is fixed but SEO.Config not took into account :frowning: