Angular-cli: including modernizr causes white screen

Created on 2 Jun 2017  ·  7Comments  ·  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

$ ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.0
node: 6.9.2
os: win32 x64
@angular/animations: 4.0.1
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
@angular/platform-server: 4.0.1

Repro steps.

  1. Generated modernizr.js:
.\node_modules\.bin\modernizr -c .\node_modules\modernizr\lib\config-all.json
  1. Moved to src\js folder (src is the root of my app)
  2. Added "js/modernizr.js" to .angular-cli.json
  3. Running ng serve shows a blank screen in the browser. No errors.

The log given by the failure.

None

Desired functionality.

The site should keep working.

easy (hours) help wanted 2 (required) broken bufix

All 7 comments

That's odd. @Brocco can you investigate?

@filipesilva Can I give it a try?

@rolandoldengarm @filipesilva fyi. Just tried the above repro steps on the latest release v1.2.1 and It seems to be no issue at all. i.e.,

@angular/cli: 1.2.1
node: 7.9.0
os: darwin x64

screen shot 2017-07-15 at 1 41 57 pm

@narainsagar thanks for the repro, closing as working as intended 👍

@rolandoldengarm said that it was a black screen. Modernizr works, but the page is in blank as well for me too. No errors.

   _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.1.2
node: 7.1.0
os: darwin x64

I solved the blank page not including all modernizr tests. Just a few, and download modernizr-custom.js from here and include the file in .angular-cli.json.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings