sollenne / angular-fittext

Angular Directive to auto-scale text to fit it's parent container. (fittext.js)
https://www.npmjs.com/package/angular-fittext
33 stars 18 forks source link

Issue installing the component #7

Closed fleed closed 7 years ago

fleed commented 7 years ago

I'm trying to add ng4-fittext to my application. The app is compiled using .net JavaScriptServices in a .NET core application.

I've added the importing directives to my NgModule defined in app.module.shared.ts file.

I'm getting the following error during compilation:

fail: Microsoft.AspNetCore.NodeServices[0]
      Hash: 22ea295ed5556b872a2d
      Version: webpack 2.5.1
      Time: 3316ms
                   Asset    Size  Chunks                    Chunk Names
          main-client.js  771 kB       0  [emitted]  [big]  main-client
      main-client.js.map  935 kB       0  [emitted]         main-client
      chunk    {0} main-client.js, main-client.js.map (main-client) 725 kB [entry] [rendered]
          [0] external "vendor_4adf5b975b06d7f766a2" 42 bytes {0} [not cacheable]
          [1] delegated ./node_modules/@angular/core/@angular/core.es5.js from dll-reference vendor_4adf5b975b06d7f766a2 42 bytes {0} [not cacheable] [built]
         [20] ./ClientApp/boot.browser.ts 989 bytes {0} [built]
         [21] (webpack)-hot-middleware/client.js?path=__webpack_hmr&dynamicPublicPath=true 6.68 kB {0} [built]
         [22] delegated ./node_modules/event-source-polyfill/eventsource.js from dll-reference vendor_4adf5b975b06d7f766a2 42 bytes {0} [not cacheable] [built]
         [25] ./ClientApp/app/app.module.browser.ts 1.35 kB {0} [built]
         [72] ./~/querystring-es3/index.js 127 bytes {0} [built]
         [73] ./~/reflect-metadata/Reflect.js 48 kB {0} [built]
         [74] ./~/strip-ansi/index.js 161 bytes {0} [built]
         [77] (webpack)-hot-middleware/client-overlay.js 1.82 kB {0} [built]
         [78] (webpack)-hot-middleware/process-update.js 3.88 kB {0} [built]
         [79] (webpack)/buildin/module.js 517 bytes {0} [built]
         [83] delegated ./node_modules/@angular/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js from dll-reference vendor_4adf5b975b06d7f766a2 42 bytes {0} [not cacheable] [built]
         [86] delegated ./node_modules/zone.js/dist/zone.js from dll-reference vendor_4adf5b975b06d7f766a2 42 bytes {0} [not cacheable] [built]
         [89] multi event-source-polyfill webpack-hot-middleware/client?path=__webpack_hmr&dynamicPublicPath=true ./ClientApp/boot.browser.ts 52 bytes {0} [built]
           + 75 hidden modules

      WARNING in ./~/ng4-fittext/~/@angular/core/@angular/core.es5.js
      5659:15-36 Critical dependency: the request of a dependency is an expression

      WARNING in ./~/ng4-fittext/~/@angular/core/@angular/core.es5.js
      5675:15-102 Critical dependency: the request of a dependency is an expression

How can I fix it?

sollenne commented 7 years ago

Sorry @fleed, I was on vacation last week. I can look at this now if you haven't found a solution.

fleed commented 7 years ago

hi @sollenne No problem, thank you for reaching out. No, I haven't solved it yet and I would appreciate your help.

sollenne commented 7 years ago

The actual warning seems misleading. I found a webpack thread that has similar issues and a few fixes. See if any of these solutions work for you. I'll take a look on my side. https://github.com/webpack/webpack/issues/196