Menu icon Foundation
No modernizr file when creating new libsass project

I have created a project using "foundation new project_name --libsass" and everything goes fine and I can see my new project index file in a browser. But I notice that there is the modernizr.js file missing on my console log, so I follow the path to that file and is not there. I been creating testing projects to see if it behaves the same way and the modernizr file is always missing.

Any Ideas why is this happening?

Screen shot 2015 09 22 at 3.04.58 pm

Screen shot 2015 09 22 at 3.05.13 pm

modernizrlibsassnew project

I have created a project using "foundation new project_name --libsass" and everything goes fine and I can see my new project index file in a browser. But I notice that there is the modernizr.js file missing on my console log, so I follow the path to that file and is not there. I been creating testing projects to see if it behaves the same way and the modernizr file is always missing.

Any Ideas why is this happening?

Screen shot 2015 09 22 at 3.04.58 pm

Screen shot 2015 09 22 at 3.05.13 pm
Rafi Benkual about 4 years ago

Modernizr 3.0 came out with breaking changes.

Looks like this was just resolved - https://github.com/zurb/foundation/issues/6896

Create a new project and you're good.

Miguel Franco about 4 years ago

Hi Rafi,

Thanks for the reply, I just created a new project but seems that modernizr.js still not showing as part of the bower_components

here are some screenshots on from index.html showing the path to modernizr.js and another showing modernizr folder content (missing modernizr.js)

Ira Vick about 4 years ago

Hi Miguel,

I'm new to Foundation and am having the same issue. I used bower to install foundation and there is no modernizr.js file in the modernizr directory.

Have you had any luck figuring out the issue?

I tried a bower update but that did not seem to help.

Seems like a new issue as I can't find much on the web about it.

Thanks,
Ira

Scott Benton about 4 years ago

Hi. I'm having the same problem here. I've reinstalled foundation via the recommended instructions here: http://foundation.zurb.com/docs/sass.html

I've tried navigating to bower_components/modermizr post-install, and running ./bin/modernizr - I was hoping would manually build / output modernizr.js. I'm getting the following error:

module.js:338
throw err;
^
Error: Cannot find module 'lodash'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/private/var/www/vhosts/mydomain.dev/templates/foundation/bower_components/modernizr/bin/modernizr:5:9)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)

Hope this can help point someone in the right direction. Thanks!

Rafi Benkual about 4 years ago

The patch release for this will be out Oct 1st

In the meantime, you can go in the bower.json file and change modernizr to

 "dependencies": {
    "jquery": ">= 2.1.0",
    "modernizr": "2.8.3",

Without the <=

Then run bower install.