Menu icon Foundation
No js working on updated 6.2 site!!

I've updated my site to Foundation 6.2 and foundation watch seems to run without errors, but when I view my site there seems to be no functioning javascript.

Hence menus don't work, and tabs don't work. Etc..

I don't know much about babel, and having everything transpiled into one app.js makes it hard to track down which component is causing trouble. App.js is huge, so I guess it's getting transpiled ok.

I only get one js error message on the page, which is:

what-input.js:9 Uncaught TypeError: Cannot set property 'whatInput' of undefined
         

If anyone has any idea how to fix that, it'd be much appreciated. I have no idea if it's an issue with gulp, foundation, babel, whatinput, jquery, etc..

NB: When updating foundation via bower there was a jquery conflict, so I went with the newest version of jquery ( 2.2.1)

F6 is nice, but the menus are a nightmare. I was hoping upgrading to F6.2 would help with that, but it's just cost me half a day of work and left me with totally non-functioning menus.

f6.2F6jsjavascriptZURB TemplateBabelerrorWhatInput

I've updated my site to Foundation 6.2 and foundation watch seems to run without errors, but when I view my site there seems to be no functioning javascript.

Hence menus don't work, and tabs don't work. Etc..

I don't know much about babel, and having everything transpiled into one app.js makes it hard to track down which component is causing trouble. App.js is huge, so I guess it's getting transpiled ok.

I only get one js error message on the page, which is:

what-input.js:9 Uncaught TypeError: Cannot set property 'whatInput' of undefined
         

If anyone has any idea how to fix that, it'd be much appreciated. I have no idea if it's an issue with gulp, foundation, babel, whatinput, jquery, etc..

NB: When updating foundation via bower there was a jquery conflict, so I went with the newest version of jquery ( 2.2.1)

F6 is nice, but the menus are a nightmare. I was hoping upgrading to F6.2 would help with that, but it's just cost me half a day of work and left me with totally non-functioning menus.

Snig over 3 years ago

Agree navigation is a nightmare (and it would appear from the Forum discussions lots of people are having issues)...

I also experienced similar build issues/errors to the one you have after following the upgrade instructions at https://github.com/zurb/foundation-sites/wiki/Upgrading-to-Foundation-6.2.

In the end I gave up trying to update my existing project from 6.1.2, but rather created a new empty project using the Foundation CLI and the latest version of the Zurb Template. I then migrated my existing content over to the new project. Initially this seemed to work well - however I now get the following weird scenario...

  1. If I open a project, then issue the Foundation Watch command I get the usual response e.g.

[21:29:58] Requiring external module babel-core/register
[21:29:59] Using gulpfile D:\project\projectname\gulpfile.babel.js
[21:29:59] Starting 'default'...
[21:29:59] Starting 'build'...
[21:29:59] Starting 'clean'...
[21:29:59] Finished 'clean' after 72 ms
[21:29:59] Starting ''...
[21:29:59] Starting 'pages'...
[21:29:59] Starting 'sass'...
[21:29:59] Starting 'javascript'...
[21:29:59] Starting 'images'...
[21:29:59] Starting 'copy'...
[21:30:05] Finished 'sass' after 5.22 s
[21:30:06] Finished 'javascript' after 6.72 s
[21:30:06] Finished 'pages' after 6.73 s
[21:30:06] Finished 'images' after 6.86 s
[21:30:06] Finished 'copy' after 6.93 s
[21:30:06] Finished '' after 6.94 s
[21:30:06] Starting 'styleGuide'...
[21:30:06] Finished 'styleGuide' after 46 ms
[21:30:06] Finished 'build' after 7.06 s
[21:30:06] Starting 'server'...
[21:30:06] Finished 'server' after 31 ms
[21:30:06] Starting 'watch'...
Access URLs:
Local: http://localhost:8000
External: http://x.x.x.x:8000
UI: http://localhost:3001
UI External: http://x.x.x.x:3001
Serving files from: dist

...the browser then starts up and the page is displayed - but with a Javascript error in the console (effectively because JQuery is missing).

  1. Upon inspection of the dist/assets/apps.js file it only contains the contents of src/assets/apps.js (none of the other Javascript source files are being concatenated to apps.js).

  2. If I then edit src/assets/apps.js, add a space character somewhere, delete it and then save, the rebuild kicks off as expected e.g.

[21:33:50] Starting ''...
[21:33:50] Starting 'javascript'...
[21:33:55] Finished 'javascript' after 4.29 s
[21:33:55] Starting ''...
[BS] Reloading Browsers...

...however this time the page operates correctly (as all Javascript is now correctly combined in the dist version of apps.js as expected with no errors).

bill over 3 years ago

I took your advice and made a new site and copied the src folder into it.
Fingers crossed, it seems to be working ok.

We'll see...

bill over 3 years ago

I think the js error was due to motionui still being at version 1.1 and that having a clashing version of jquery from F6.2

However, even after fixing that my site that i upgraded was totally borked. So the fresh install and copy SRC folder seems like the safest solution for now.