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:
- Foundation new
- Select Zurb template
- Open app.js
- Uncomment
import './lib/foundation-explicit-pieces'; - Comment out
require('foundation-sites'); - Open foundation-explicit-pieces.js and comment out some imports
- 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)
In general the CLI only clones the Git repository, in this case https://github.com/foundation/foundation-zurb-template
See https://github.com/foundation/foundation-zurb-template/pull/97