Problem using the marker function with angular cli
See original GitHub issueHello,
Would you please help me with this error? It happens when I mark a string for extraction. Thanks a lot.
/home/bbv/BBV/Client/node_modules/@biesbjerg/ngx-translate-extract/dist/cli/cli.d.ts (1,1): Cannot find type definition file for 'yargs'.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Not able to call a method when a feature/marker is selected in ...
I am having a map with multiple ol/Feature markers. When clicking on a marker some code should be executed. The problem is that...
Read more >Markers | Maps JavaScript API - Google Developers
You may add the marker later by calling the marker's setMap() method. The following example adds a simple marker to a map at...
Read more >Dependency injection in action - Angular
When a class requires a dependency, that dependency is added to the constructor as a parameter. When Angular needs to instantiate the class,...
Read more >Getting Started With Angular Using the Angular CLI
In this tutorial, you created an Angular project using the Angular CLI. You excecuted and ran the project in the browser, and updated...
Read more >Angular Hello World: Creating Your First Angular Application
The root component looks very pristine and neat, with barely any references or dependencies. The only main thing in this file is the...
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
We just ran into this as well. The cause was that our IDE generated the import
rather than
As a consequence, webpack pulled the entire code of ngx-translate-extract into the bundle (no clue why tree shaking didn’t work), and failed upon analysing some transitive dependencies. The resulting stack trace was not pretty, and left the developer mystified.
Of course, it is entirely unnecessary to load the entire extraction tool at runtime if we just want this single function … would it be possible to exclude the marker function from dist/index.js so IDEs only suggest the harmless deep import?
My solution is instead of using the built-in marker function, I create a very simple function with the same name “_” like this:
then just use:
then run the extractor with marker option as the doc said, the extractor still fine your texts while the JIT can work properly. Good luck.