Comments (13)
Bad things happen when npm installs two copies of @uirouter/core
. (note: yarn handles this with no problems). There was an explicit dependency on @uirouter/core@^5.0.0
and a transitive dependency through @uirouter/angular
. npm seems to install one copy for each dependency.
I removed the explicit dependency on @uirouter/core
in package.json and npm is now only installing one copy.
from sample-app-angular.
Seeing this too
$ npm -v
3.10.8
$ node -v
v6.9.0
$ tsc -v
Version 2.3.2
from sample-app-angular.
I cast routerFunc as and it compiled
from sample-app-angular.
I cast routerFunc as ANY and it compiled
from sample-app-angular.
from sample-app-angular.
from sample-app-angular.
@christopherthielen It would help a lot if there was not hard fixed version for @uirouter/core
in @uirouter/angular
as this also leads to major problems when using JSPM.
from sample-app-angular.
@DaSchTour @uirouter/angular
should have a hard dependency on @uirouter/core
so a given version of @uirouter/angular
always behaves the same way.
What problems does this cause for jspm?
from sample-app-angular.
@christopherthielen the problem is, that there are different version installed. To have access to uirouter/core functions I have to install it explicitly with JSPM. But this leads to problems because uirouter/angular installs another version and so I have to instances of services and injection fails. So I have tell JSPM which version it should use for all dependencies after every update. Somehow the version and dependency handling of all uirouter modules (core, angular and rx) seams to be very inconsistent and IMHO a bit strange.
from sample-app-angular.
To have access to uirouter/core functions I have to install it explicitly with JSPM.
This is surprising to me. The @uirouter/*
packages use what I think are typical node dependencies. core
has no external deps, angular
depends on a specific version of core
and rx
has a peer dependency on a range of versions of core
.
from sample-app-angular.
@christopherthielen that's definitely not true. rx
for example has rollup as a runtime dependency. So instead of handling core
as a dependency JSPM only offers rollup as a dependency.
from sample-app-angular.
rx for example has rollup as a runtime dependency.
Ah yes, that's definitely wrong. I see you filed a bug ui-router/rx#5, thanks!
However, the legitimate @uirouter/rx
dependencies are alrady listed as peerDependencies
. It looks like JSPM supports peer deps. Why doesn't this work?
"peerDependencies": {
"@uirouter/core": ">=5.0.0",
"rxjs": "^5.0.3"
},
from sample-app-angular.
@christopherthielen I really have no idea. But I have no time to test this as we changed our setup. As there are so many obstacles using @angular/router
with JSPM I tried to to the migration from uirouter/angularjs to uirouter/angular on JSPM but now we've build up the project from scratch with angular-cli and try to minimize the dependency to 3rd party libraries.
from sample-app-angular.
Related Issues (17)
- The live demo is not working HOT 2
- cloned and ng build, it shows the following error: HOT 1
- Action required: Greenkeeper could not be activated 🚨
- app failed to start with "npm start" command HOT 5
- named views? HOT 1
- no tsconfig = errors running
- Errors running ng serve
- Error installing Cypress HOT 2
- No Provider for StateService. HOT 4
- Add unit testers?
- Sync Parent data and child data
- Lazy loading don't works after updating to Angular 4.2.0 HOT 1
- GA not working in googleAnalyticsHook HOT 2
- feature request: update app with test specs
- AppRoutingModule HOT 1
- TypeError: Cannot read property 'createComponent' of undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sample-app-angular.