This repository was archived by the owner on May 1, 2020. It is now read-only.
-
Couldn't load subscription status.
- Fork 314
This repository was archived by the owner on May 1, 2020. It is now read-only.
3rd party lib and declaration files #21
Copy link
Copy link
Closed
Description
If I add a 3rd party module to my project and create a ./src/declarations.d.ts file definition for that module, I am able to run my app (if the definitions are correct) however the app-scripts output indicates error.
The error from the output that is meaningful is this:
[01:41:57] src/pages/home/home.ts(5,18): error TS2307: Cannot find module 'node-uuid'.
$ ionic serve Running 'serve:before' npm script before serve > ionic-hello-world@ watch /Users/dan/Dev/lib-test > ionic-app-scripts watch [01:41:55] watch started ... [01:41:55] build dev started ... [01:41:55] clean started ... [01:41:55] clean finished in 1 ms [01:41:55] copy started ... [01:41:55] typescript compiler started ... [01:41:55] lint started ... [01:41:55] copy finished in 38 ms [01:41:56] lint finished in 440 ms [01:41:57] src/pages/home/home.ts(5,18): error TS2307: Cannot find module 'node-uuid'. [01:41:57] typescript compiler ready in 1.92 s [01:41:57] bundle dev started ... [01:42:00] rollup: Treating 'crypto' as external dependency [01:42:01] rollup: No name was provided for external module 'crypto' in options.globals – guessing 'crypto' [01:42:02] bundle dev finished in 5.11 s [01:42:02] sass started ... [01:42:03] sass finished in 912 ms [01:42:03] build dev finished in 7.94 s [01:42:03] watch ready in 8.00 s Steps to reproduce:
1. git clone git@github.com:danbucholtz/lib-test.git 2. git checkout declaration-file 3. npm install 4. ionic serve The output indicates error, but the app still runs which indicates the error was not legitimate. The 3rd party module works as expected in the Ionic app within the browser. To verify, open the console and view a guid being logged.
Thanks,
Dan
Metadata
Metadata
Assignees
Labels
No labels