Symbol is not defined


I have this code in server part :

 var QueryBuilderInstance = null;
class QueryBuilder {
    constructor() {
    static getInstance() {
        if (QueryBuilderInstance == null)
            QueryBuilderInstance = new QueryBuilder();
        return QueryBuilderInstance;
    buildQuery(templateQuery, params) {
        if(params != null && params.size > 0) {

            for (let [key, value] of params.entries()) {
                templateQuery[key] = value;
        return templateQuery;
this.QueryBuilder = QueryBuilder;

When I run this code I have this error : ReferenceError: Symbol is not defined,
This error is for the line with the loop for…of, I don’t understand why ?


The for ... of ... is transpiled to include a reference to Symbol:

As to why you’re getting an error, I don’t really know … has the es5-shim package been added?

es5-shim is already present in my package

I solve problem to replace for…of by forEach()

Using would also fix the problem I guess. It adds a Symbol polyfill. This polyfill will be shipped with the next Meteor release by default.