Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot re-export name that is not defined in the module #166

Closed
gigocabrera opened this issue Mar 21, 2016 · 14 comments
Closed

Error: Cannot re-export name that is not defined in the module #166

gigocabrera opened this issue Mar 21, 2016 · 14 comments

Comments

@gigocabrera
Copy link

I'm getting the following error when I run ionic serve. I am using the latest as of today

ionic-conference-app-error-05

C:\ionic\ionic-conference-app>ionic info

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v5.1.1
@ace-han
Copy link

ace-han commented Mar 21, 2016

@gigocabrera I've come across this issue. Plz upgrade your angular version to the latest one

you can refer to angular/angular#6468

and I think package.json in this demo project should upgrade the version number for angular2

@gigocabrera
Copy link
Author

@ace-han pardon my ignorance but how do you upgrade angular to the latest?

@ace-han
Copy link

ace-han commented Mar 21, 2016

@gigocabrera just cd to your project folder and then
npm install angular2@>2.0.0-beta.9
you may probably upgrade the es6-shim versions along, too, according to the output

@gigocabrera
Copy link
Author

Awesome, thank you!

@brandyscarney
Copy link
Member

@gigocabrera Is this working for you now?

@gigocabrera
Copy link
Author

@brandyscarney no it didn't. The command below completed fine with a few warning but the conference app didn't load

npm install angular2@>2.0.0-beta.9

I'm not experienced enough to troubleshoot the issue and find a solution

@brandyscarney
Copy link
Member

Can you try the following:

  • Update the CLI to 21: npm install -g ionic@beta (may require sudo)
  • Clone latest of conference app
  • Run npm install in conference app

Then if you're still getting the error can you run this command npm list --depth=0 and paste the output here?

@gigocabrera
Copy link
Author

@brandyscarney I did as requested and I still see the error

  • Updated CLI to 21
  • Cloned the latest
  • Ran npm install

Here's the output for the npm list --depth=0 command:

C:\ionic\ionic-conference-app>npm list --depth=0
ionic-conference-app@ C:\ionic\ionic-conference-app
+-- angular2@2.0.0-beta.6
+-- autoprefixer-loader@3.1.0
+-- awesome-typescript-loader@0.15.10
+-- babel-core@6.5.2
+-- babel-loader@6.2.3
+-- babel-plugin-transform-decorators-legacy@1.3.4
+-- babel-preset-es2015@6.5.0
+-- css-loader@0.22.0
+-- del@1.1.1
+-- es6-promise@3.0.2
+-- es6-shim@0.33.13
+-- extend@2.0.1 extraneous
+-- file-loader@0.8.5
+-- graceful-fs@3.0.8 extraneous
+-- gulp@3.9.1
+-- gulp-autoprefixer@3.1.0
+-- gulp-sass@2.2.0
+-- gulp-watch@4.3.5
+-- ionic-angular@2.0.0-beta.3
+-- ionic-framework@2.0.0-beta.1 extraneous
+-- ionic-gulp-fonts-copy@1.0.0
+-- ionic-gulp-html-copy@1.0.0
+-- ionic-gulp-sass-build@1.0.0
+-- ionic-gulp-webpack-build@1.0.0
+-- ionic-native@1.1.0
+-- ionicons@3.0.0-alpha.3
+-- is-array@1.0.1 extraneous
+-- lodash.padleft@3.1.1 extraneous
+-- lodash.padright@3.1.1 extraneous
+-- moment@2.10.6 extraneous
+-- node-sass@3.4.2
+-- reflect-metadata@0.1.2
+-- rxjs@5.0.0-beta.0
+-- sass-loader@3.1.2
+-- shelljs@0.5.3 extraneous
+-- strip-sourcemap-loader@0.0.1
+-- style-loader@0.13.0
+-- typescript@1.8.7
+-- url-loader@0.5.7
+-- webpack@1.12.14
`-- zone.js@0.5.14

npm ERR! extraneous: extend@2.0.1 C:\ionic\ionic-conference-app\node_modules\extend
npm ERR! extraneous: graceful-fs@3.0.8 C:\ionic\ionic-conference-app\node_modules\graceful-fs
npm ERR! extraneous: ionic-framework@2.0.0-beta.1 C:\ionic\ionic-conference-app\node_modules\ionic-framework
npm ERR! extraneous: is-array@1.0.1 C:\ionic\ionic-conference-app\node_modules\is-array
npm ERR! extraneous: lodash.padleft@3.1.1 C:\ionic\ionic-conference-app\node_modules\lodash.padleft
npm ERR! extraneous: lodash.padright@3.1.1 C:\ionic\ionic-conference-app\node_modules\lodash.padright
npm ERR! extraneous: moment@2.10.6 C:\ionic\ionic-conference-app\node_modules\moment
npm ERR! extraneous: shelljs@0.5.3 C:\ionic\ionic-conference-app\node_modules\shelljs

C:\ionic\ionic-conference-app>

@brandyscarney
Copy link
Member

Ok so I was able to reproduce it on the typescript branch. Sorry, I was testing on the master branch of the conference app. 😞 I found an open issue for it on the CLI repo: ionic-team/ionic-cli#848

It looks like it will be fixed when we update the framework to use the latest angular version, but this comment has a workaround for now: angular/angular#6468 (comment)

So you go into node_modules/angular2/src/facade/promise.d.ts and add this as the first line:

declare var Promise: PromiseConstructor;

that should fix it.

Also, unrelated, but it seems you have some modules installed that don't exist in package.json. You can remove node_modules and do a fresh npm install to get rid of those (but then add this fix after you install).

Let me know if that works for you!

@gigocabrera
Copy link
Author

@brandyscarney as always, you're the best!!! The error message went away.

@brandyscarney
Copy link
Member

Awesome! I'll keep this open until we get the fix in in case anyone else runs into it. 😄

@pgorbas
Copy link

pgorbas commented Mar 29, 2016

Thanks for keeping this open - I had to apply Brandy's fix as well.

@brandyscarney
Copy link
Member

This should be fixed with the latest code of the conference app. Please let me know if you run into issues! Thanks for the issue!

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 12, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the Ionic Conference App, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants