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.

3rd party lib wiki instructions - broken with ng serve -prod

See original GitHub issue

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX El Cap

  1. Versions. Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version And paste the result here.
$ ng --version
(node:11861) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.5
node: 6.1.0
os: darwin x64
  1. Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.
  1. The log given by the failure. Normally this include a stack trace and some more information.

This is an extremely frustrating failure mode: there is no log output. There is no error. If there is nothing in the terminal, there is nothing in the browser console. The application simply fails to ever come to life.

  1. Mention any other details that might be useful.

    Thanks! We’ll be in touch soon.

Based on the number of issues open in the last few days that mention it, the wiki page about adding libraries appears to be insufficient at best, and more likely wrong (at least for -prod). I suggest replacing it or augmenting it with a demo repository showing an example:

  • Several common third-party libraries, integrated in the recommended way.
  • Tested with each new CLI release.
  • Tested with the -prod option.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
filipesilvacommented, Jun 1, 2016

It seems that autodetecting the module format for moment was broken. I’ve updated https://github.com/angular/angular-cli/wiki/3rd-party-libs with current steps and tested locally, please tell me if they don’t work for you.

Basically additional configuration is needed in system-config.js:

const packages: any = {
  'moment':{
    format: 'cjs'
  }
};

Regarding the tsconfig, they were put down in the projects themselves because there are scenarios where one can have multiple apps in a single repo. https://github.com/angular/material2 for instance does this.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a third party library when using angular-cli?
I created a project with ng new myproject then I started the server with ng serve and opened the webpage which just worked...
Read more >
ng serve - Angular
Option Description Value Type Default Value ‑‑hmr Enable hot module replacement. boolean false ‑‑host Host to listen on. string localhost ‑‑open Opens the url in default...
Read more >
NGINX 3rd Party Modules
Module Description Repository Accept Language Module Accept‑Language header parser giom/nginx_acc... AFCGI Asynchronous/multiplexing FastCGI for NGINX rsms/afcgi HTTP Digest Authentication HTTP Digest Authentication atomx/nginx‑htt...
Read more >
OpenSSH - ArchWiki
Often the target of brute force attacks, SSH access needs to be limited properly to prevent third parties gaining access to your server....
Read more >
Biology - Wikipedia
Biology is the scientific study of life. It is a natural science with a broad scope but has ... It has been suggested...
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