declare some third party variable like 'moment' in typing.d.ts, and run build library also throw: Cannot find name 'moment'
See original GitHub issueType of Issue
[ x] Bug Report
[ ] Feature Request
Description
declare some third party variable like ‘moment’ in typing.d.ts, and run build library also throw: Cannot find name ‘moment’
How To Reproduce
Expected Behaviour
how can i config this third party variable to build libary
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: 5.3.0
@angular/compiler: 8.0.2
rollup: 1.16.2
tsickle: 0.35.0
typescript: 3.4.5
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Moment.js + TypeScript. Cannot find name moment
Now i try to use moment.js. Like with knockout: install, include d.ts, include script to page and i get an error cannot find...
Read more >Typescript Typings: The Complete Guide: @types Compiler ...
Typescript Typings - The Complete Guide To Type Definitions: @types, Compiler Opt-In Types: When To Use Each and Why?
Read more >Changelog - Cypress Documentation
Fixes #24611; Fixed an 11.0.0 regression where using custom reporters would cause Cypress to throw a 'Cannot find module' error.
Read more >rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >Docs - Moment.js
This option can be used to take the internal UTC-based timestamp of a Date object and get a string that has been converted...
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 FreeTop 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
Top GitHub Comments
Welcome to my world of 1+ year of “nobody care”. https://github.com/ng-packagr/ng-packagr/issues/744
Hi, thanks for quick response.
It’s a matter of taking both benefit of peerDependencies and dependencies in a production context.
As an Angular deployed applications hub, I want to be able to import plugins angular applications. I don’t want them to copies peerDependencies, but I do want them to come with there own dependencies I don’t have already.
I want to be able to develop a new plugin application without having to reference it’s dependencies in my hub application and without to redeploy.
A nice final umd file which can be consume by another ALREADY built angular application. I can already achieve this with extra steps by installing dependencies in dist folder and using browserify on top on that but I guess it’s could be done by some rollup step on build.