angular-cli


Setting up tether-drop to work with angular-cli#1.0.0-beta.24


I'm having difficulty figuring out how to setup tether-drop with my angular 2 app created with angular-cli#1.0.0-beta.24.
Steps to reproduce:
Create a new project with the angular-cli.
ng new tester --skip-git
Follow the angular-cli instructions for installing third party library:
npm install tether-drop --save
npm install #types/tether-drop --save
At this point I fully expect to be able to use the following line in app.component.ts
import { Drop } from 'tether-drop';
But when I ng serve the result is this error:
ERROR in ./src/app/app.component.ts
Module build failed: Error: D:/Visual Studio Code/tester/src/app/app.component.ts (3,10): Module '"D:/Visual Studio Code/tester/node_modules/#types/tether-drop/index"' has no exported member 'Drop'.)
at _checkDiagnostics (D:\Visual Studio Code\tester\node_modules\#ngtools\webpack\src\loader.js:116:15)
at D:\Visual Studio Code\tester\node_modules\#ngtools\webpack\src\loader.js:141:17
# ./src/app/app.module.ts 14:0-47
# ./src/main.ts
# multi main
I have struggled mightily with integrating third party libraries into angular-cli generated projects (webpack). I managed to get some of them working but a solution for this one is alluding me.
Can someone please enlighten me and remove this burden of ignorance from me?
It seems that you need to change your import to:
import * as Drop from 'tether-drop';
And then you can use it as per the README:
const dropInstance = new Drop({
/* options here */
});

Related Links

Angular-cli with Stylus doesn't work
Use angular-cli proxy for multiple backends
chunk files size are multiplied by 5 on build size ng build --prod
AngularCli: disable minification
Angular Cli e2e element explorer not responding
Angular cli generate a service and include the provider in one step
Angular-cli not generating dist directory with ng build
How to update service json or array value on click in angular2?
How to revert from Angular-cli to Angular without cli for server-side rendering with Angular Universal
How to change file index outside the root
angularCLI Access-Control-Allow-Origin Multiple Origin Domains
Angular CLI how to merge json files
Angular CLI (ng) use single instead of double quotes
can't install angular cli on ubuntu 16.04
How to solve No 'Access-Control-Allow-Origin' header is present on the requested resource with angular 2 service written with angular-cli?
Usage of watch parameter in eject command of Angular CLI

Categories

HOME
sql-server-2008
answer-set-programming
puzzle
warnings
paramiko
facebook-graph-api
cpu-architecture
json-ld
rebol
bro
shipping
unity2d
simple-injector
multiple-monitors
event-log
mod-pagespeed
r-lavaan
arraylist
anychart
android-fragmentactivity
plsqldeveloper
statusbar
apply
jquery-form-validator
avplayeritem
onsen-ui
novnc
pdfsharp
printdocument
onesignal
upnp
reply
google-api-dotnet-client
bxslider
xor
graph-databases
data-extraction
css-counter
jquery-cycle2
shibboleth
fltk
agent
tic-tac-toe
dojox.mobile
taglib
powermta
catia
amazon-clouddrive
automator
vcf
seamless-immutable
tiddlywiki
xmgrace
shutdown
bnd
text-classification
rpostgresql
jexl
nuget-server
jszip
opencpu
jcreator
vici
keycode
pspice
sql-server-administration
master
iostat
alter
debugdiag
activeweb
radians
mercurial-hook
amazon-kcl
persistence.xml
android-snackbar
abas
pyrocms
divide-by-zero
google-hadoop
jazz
chaining
gmaps4rails
ibmsbt
formvalidation-plugin
yahoo-boss-api
config-files
xenocode
uipickerviewcontroller
visual-c++-2010-express
exiv2
pyjade
sim900
cling
angulartics
bfd
bigint
image-zoom
ng-hide
reporting-tools
vertical-scrolling
zend-framework-modules
bulbs
applicationcontext
objective-c-protocol
viewdidload
datamember
paintcomponent
adsl
audiostreamer
front-controller
kpi
soft-keyboard
castle-validators

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App