Skip to content

Error: Cannot set property 'EvEmitter' of undefined in Foundation Framework including Handlebars templates and Sass/JS compilers #880

@shannonschaerer

Description

@shannonschaerer

I don't think I can create a test case on code pen due to the nature of the situation. However... I am trying to include masonry with bower and can't get it to work for the life of me. I proceeded in the following way.

Include via bower:
bower install masonry --save

Bower.json overwritten with the following:

{
  "name": "foundation-ssg",
  "version": "1.0.0",
  "authors": [
    "ZURB <[email protected]>"
  ],
  "description": "Static site generator for Foundation for Sites.",
  "main": "gulpfile.js",
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "foundation-sites": "~6.2.3",
    "motion-ui": "~1.2.2",
    "masonry": "^4.1.0"
  },
  "private": true
}

Updated config.yml with the line:

# Paths to your own project code are here
    - "bower_components/masonry/dist/masonry.pkgd.min.js"

I even tried to include an override in the bower.json file:

{
  "name": "foundation-ssg",
  "version": "1.0.0",
  "authors": [
    "ZURB <[email protected]>"
  ],
  "description": "Static site generator for Foundation for Sites.",
  "main": "gulpfile.js",
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "foundation-sites": "~6.2.3",
    "motion-ui": "~1.2.2",
    "masonry": "^4.1.0",
    "OwlCarousel": "^1.3.2"
  },
  "overrides": {
    "masonry": {
      "main": "./dist/masonry.pkgd.min.js"
    }
  },
  "private": true
}

And added the following function to my gulpfile.babel.js:

gulp.task('bower', function () {
  var bowerOverrides = require('gulp-bower-overrides');

  return gulp.src('bower_components/*/bower.json')
    .pipe(bowerOverrides())
    .pipe(gulp.dest('dist'));
});

It appears that the pkgd.js is being retrieved as I can see it in the source code. I hope I'm not being a nuisance, but this issue is bugging me.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions