-
Notifications
You must be signed in to change notification settings - Fork 304
Dev build/ionic serve fail when using globally-defined types. #163
Comments
I needed to manually add src/declarations.d.ts to my project after upgrading to rc1 and I think that helped. You can see what the file looks like if you start a new blank rc1 project. |
@jamesgroat I believe this is a slightly different issue. If there's something to add to |
As a workaround for anyone having this issue, you can add the following to the
The values in the |
So, this isn't an actual bug, then. This is the desired behavior. Going to close this issue for now. Perhaps we should document this better. This is a general Typescript thing, though. Thanks, |
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
Using the
ionic-app-scripts@0.0.33
(or any version greater than0.0.30
), building with--dev
(and, by extension,ionic serve
) will fail if you reference types that are defined globally. Specific examples that I've seen are@types/jasmine
and@types/googlemaps
. Neither of these packages declares amodule
that can be imported with animport
statement.A production build completes successfully, and a dev build completes successfully on
ionic-app-scripts@0.0.30
.What behavior are you expecting?
I expect the build to complete successfully. 😉
Steps to reproduce:
ionic start test --v2
)ionic-app-scripts@0.0.33
, if the starter still does not reference it.npm run build --dev
). This build should be successful.npm install --save @types/googlemaps
).public thingy: google.maps.places.PlaceResult = null;
tosrc/pages/home/home.ts
.Which @ionic/app-scripts version are you using?
0.0.33
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I'm developing on Windows. I haven't tried this on another OS, but I know there have been some Windows-specific issues with the last few versions of
ionic-app-scripts
.The text was updated successfully, but these errors were encountered: