Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

not include node_modules/@types in dev build #179

Closed
izee opened this issue Oct 17, 2016 · 7 comments · May be fixed by enterstudio/ionic-app-scripts#42 or enterstudio/ionic-app-scripts#43
Closed
Assignees

Comments

@izee
Copy link

izee commented Oct 17, 2016

I installed @types/cordova and ionic build works fine.
but ionic serve output:

[11:19:42] ionic-app-scripts 0.0.36
[11:19:42] watch started ...
[11:19:42] build dev started ...
[11:19:42] clean started ...
[11:19:42] clean finished in 1 ms
[11:19:42] copy started ...
[11:19:42] transpile started ...
[11:19:43] lint started ...
[11:19:45] lint finished in 2.36 s
[11:19:47] typescript: D:/Develop/Project/team.app/src/pages/home/home.ts, line: 89

        Cannot find name 'cordova'.
  L88:  handler: ()=> {
  L89:      cordova.plugins.settings.openSetting("location_source", ()=> {
  L90:              createAlert.dismiss();

[11:19:47] transpile failed

[11:19:47] copy finished in 4.88 s
[11:19:47] watch ready in 4.98 s

@izee izee changed the title Cannot find name 'cordova' in dev build not include node_modules/@types in dev build Oct 17, 2016
@danbucholtz
Copy link
Contributor

danbucholtz commented Oct 17, 2016

@izee,

Can you make a sample repo showing the problem? I have not seen this behavior in my testing.

Thanks,
Dan

@guillenotfound
Copy link

Maybe... declare var cordova: any; after your imports?

@izee
Copy link
Author

izee commented Oct 18, 2016

@danbucholtz demo is here

@izee
Copy link
Author

izee commented Oct 18, 2016

ionic build --dev always build prod.
npm run build --dev or ionic serve will show the issue.

@jgw96 jgw96 removed the needs_reply label Oct 20, 2016
@jgw96
Copy link
Contributor

jgw96 commented Oct 27, 2016

Hello, thanks for using Ionic! I unfortunately cannot reproduce this issue with the latest version of app-scripts. Because of this I am going to close this issue for now. I would recommend asking around on our forum for further help.

@jgw96 jgw96 closed this as completed Oct 27, 2016
@izee
Copy link
Author

izee commented Oct 28, 2016

@jgw96 please checkout this repo, the issue is still exist.

@viskin
Copy link

viskin commented Feb 25, 2017

Can confirm the issue still exists with ionic-cli 2.2.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants