foundation-sites: Uncaught TypeError: Super expression must either be null or a function with BUILD

I’m getting this error when using the foundation-explicit-pieces.js and customize it to my needs. But ONLY when i use foundation build. With foundation watch everything works just fine.

It doesnt matter which lib i turn off or on, tested with everything off and only left import { Foundation } from 'foundation-sites/js/foundation.core'; this works fine, but when i turn on import { OffCanvas } from 'foundation-sites/js/foundation.offcanvas'; it gives me the error when using build.

What should happen?

It should build without any errors …

What happens instead?

Receiving this error: Uncaught TypeError: Super expression must either be null or a function

Possible Solution

Test Case and/or Steps to Reproduce (for bugs)

How to reproduce:

  1. Foundation new
  2. Select Zurb template
  3. Open app.js
  4. Uncomment import './lib/foundation-explicit-pieces';
  5. Comment out require('foundation-sites');
  6. Open foundation-explicit-pieces.js and comment out some imports
  7. Run command foundation build

Context

This error stops running any of the javascript following $(document).foundation();

Your Environment

  • Foundation version(s) used: Foundation CLI 2.2.5 & foundation-sites: ^6.5.1
  • Browser(s) name and version(s): Google Chrome Version 77.0.3865.120 (Official Build) (64-bit)
  • Device, Operating System and version: iMac macOS High Sierra version 10.13.6
  • Node version: v10.15.0
  • NPM version: 6.10.3

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (16 by maintainers)

Most upvoted comments