3rd party lib wiki instructions - broken with ng serve -prod
See original GitHub issuePlease provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
OSX El Cap
- 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
- Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.
- ng new your app
- Follow instructions in https://github.com/angular/angular-cli/wiki/3rd-party-libs to add the moment.js library.
ng serve
, works fineng serve -prod
- the application never finishes bootstrapping, never replaces the “loading” text. No messages, just failure.
- 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.
- 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:
- Created 7 years ago
- Reactions:3
- Comments:17 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
: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.
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.