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

Get NPM Link working on Ionic Repo #1075

Closed
danbucholtz opened this issue Jun 14, 2016 · 5 comments
Closed

Get NPM Link working on Ionic Repo #1075

danbucholtz opened this issue Jun 14, 2016 · 5 comments
Assignees

Comments

@danbucholtz
Copy link

Right now, There isn't a good way to get npm link working for the Ionic repo.

We execute the following process to test local builds.

gulp package build —typecheck
** delete contents of test project's node_modules/ionic-angular dir **
** copy and paste contents of ionic/dist to test project's node_modules/ionic-angulardir **

It is not the best process. npm link would work much better but the build process does not support it right now.

@rapropos
Copy link

rapropos commented Jul 1, 2016

I have no idea how this affects browserify, but when using webpack, I banged into this issue and this issue and this issue, which all resulted in rather mysterious bugs due to two angulars being included in the build. However, adding the following aliases to the test project (the npm link consumer) seems to have resolved the issue, allowing me to use an npm linked ionic. I don't know if this is the problem you're referencing, but since I spent the last day and a half banging my head against the wall on this, I thought I would at least share what I learned.

      "@angular/common": path.resolve(__dirname, "node_modules/@angular/common"),
      "@angular/compiler": path.resolve(__dirname, "node_modules/@angular/compiler"),
      "@angular/core": path.resolve(__dirname, "node_modules/@angular/core"),
      "@angular/forms": path.resolve(__dirname, "node_modules/@angular/forms"),
      "@angular/http": path.resolve(__dirname, "node_modules/@angular/http"),
      "@angular/platform-browser": path.resolve(__dirname, "node_modules/@angular/platform-browser"),
      "@angular/platform-browser-dynamic": path.resolve(__dirname, "node_modules/@angular/platform-browser-dynamic")

@danbucholtz
Copy link
Author

Hi @rapropos,

Thanks for sharing! I'll try it on Tuesday and get back to you!

Thanks,
Dan

@danbucholtz danbucholtz self-assigned this Jul 2, 2016
@danbucholtz
Copy link
Author

Hi @rapropos,

It might be a few days. Really swamped right now!

Thanks!
Dan

@dorontal
Copy link

dorontal commented Aug 2, 2016

Thanks so much for those aliases which will probably solve my problem @rapropos, but I am not sure how to use them. Where do I put those? I don't have a webpack.config.js - my project does not use webpack (also tried a project started with ionic start tabs-test tabs and it too does not use webpack) - but these aliases seem like webpack config aliases, not sure. But thanks for the lead that two angulars are being loaded - checking up on that...

@danbucholtz danbucholtz assigned jthoms1 and unassigned danbucholtz Aug 2, 2016
@danbucholtz
Copy link
Author

Changing assignment to @jthoms1 to ensure this works with forth coming webpack build process.

@imhoffd imhoffd closed this as completed Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants