question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@angular-devkit/build-optimizer@0.1001.0 after prod build, only a black screen is displayed on the device

See original GitHub issue

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

Install @angular-devkit/build-angular@0.1001.0 or @angular-devkit/build-angular@0.1001.0-rc.0

After build, only a black screen is displayed on the device and the app cannot be used.

FYI, it works without problem until version @angular-devkit/build-angular@0.1000.8 or @angular-devkit/build-angular@0.1001.0-next.7

🔬 Minimal Reproduction

  1. npm install @angular-devkit/build-angular@0.1000.8 or @angular-devkit/build-angular@0.1001.0-next.7
  2. ng build --prod
  3. run on ios/android device
  4. it works fine
  5. npm install @angular-devkit/build-angular@0.1001.0 or @angular-devkit/build-angular@0.1001.0-rc.0
  6. ng build --prod
  7. run on ios/android device
  8. only a black screen is displayed on the device and the app cannot be used

🌍 Your Environment


Angular CLI: 10.1.0
Node: 12.18.3
OS: darwin x64

Angular: 10.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.0
@angular-devkit/build-angular      0.1001.0-next.7
@angular-devkit/build-optimizer    0.1001.0
@angular-devkit/build-webpack      0.1001.0
@angular-devkit/core               10.1.0
@angular-devkit/schematics         10.1.0
@angular/cdk                       10.2.0
@angular/fire                      6.0.2
@angular/material                  10.2.0
@angular/material-moment-adapter   10.2.0
@angular/pwa                       0.1001.0
@angular/youtube-player            10.2.0
@ngtools/webpack                   10.1.0-next.7
@schematics/angular                10.1.0
@schematics/update                 0.1001.0
rxjs                               6.6.2
typescript                         4.0.2
webpack                            4.44.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:19

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Sep 7, 2020

HI, I started looking and there are a multiple reasons why using kakao-sdk is causing the failure.

  • You are using a JIT version of the library import { KakaoCordovaSDK } from 'kakao-sdk/ngx'; the AOT version is located at import { KakaoCordovaSDK } from 'kakao-sdk'; (Note: shipping both AOT and JIT is not needed, AOT compiled libraries can work in JIT mode as well.)
  • This Angular library package format doesn’t conform with APF. The Angular package format is a spec used by library developers to package a valid Angular libraries. (See: https://github.com/ng-packagr/ng-packagr and https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview)
  • tslib helpers are being inlined. This is discouraged as it will increase the application bundle size.

I will try to land a fix for this soon, however I strongly suggest that you reach out the library author to address the mentioned issues.

1reaction
eun-choicommented, Sep 4, 2020

Tested by overwriting the file, it was the same.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI v11.0.0-next.0 Release - GitClear
#18639. @angular-devkit/build-optimizer@0.1001.0 after prod build, only a black screen is displayed on the device.
Read more >
I get this error:Cannot find module '@angular-devkit/build ...
installed the latest. npm install -g @angular/cli@latest. but first I update my npm with this command: installed the latest npm.
Read more >
Fixing Could not find module @angular-devkit/build-angular ...
To fix Could not find module angular-devkit-build-angular error in Angular follow the below steps 1. Delete node_modules folder and run npm ...
Read more >
Angular and Deep Learning
dia, electronic display or mechanical display, including, but not limited to, ... 0.1001.0-next.5 ... npm install --save-dev @angular-devkit/build-angular.
Read more >
angular/angular-cli - Gitter
Does anyone know why for @angular-devkit/build-angular the version went from ... Just published a Angular component library for BabylonJS/WebGL to GitHub: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found