0
votes

Hello everybody so i've ran into some issues as I am learning Angular. I initially watched thenewboston's Angular 2 tutorial. When i finished that I then proceeded to follow Angular's quick start tutorial.The two are very similar, but in bucky's its set up to make js files out of ts files. I updated the package.json by according to the errors, but when I run npm install it gives me errors that a certain package is need. More importantly i feel as if this is somehow affecting the behavior cause I cant nest the component as in Angular's hero list tutorial. package.json:

{
  "name": "angular-2",
  "version": "1.0.0",
  "scripts": {
    "start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "typings": "typings",
    "postinstall": "typings install"
  },
  "license": "ISC",
  "dependencies": {
    "angular2": "2.0.0-beta.21",
    "systemjs": "0.19.41",
    "es6-shim": "^0.35.0",
    "reflect-metadata": "0.1.9",
    "rxjs": "5.0.0-rc.4",
    "rxjs": "5.0.1",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "0.6.12"
  },
  "devDependencies": {
    "concurrently": "^3.1.0",
    "lite-server": "^2.1.0",
        "rxjs": "5.0.0-rc.4",

    "typescript": "^2.1.4",
    "typings": "^2.1.0"
  }
}

npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of zone.js@^0.7.2 but none was installed. npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. npm WARN [email protected] requires a peer of [email protected] but none was installed. npm WARN [email protected] requires a peer of zone.js@^0.7.4 but none was installed. npm WARN [email protected] requires a peer of [email protected] but none was installed. npm WARN [email protected] No repository field.

1
Would check in your node_modules to see what actually installed, probably worth it to wipe out node_modules and do the install again in case some modules are half installed or something. Typically the warnings aren't anything to worry about but those are for packages you're explicitly requiring as dependencies so you should have them in your node_modulesshaunhusain
ah I see... you seem to have multiple rxjs entries in the dependencies you should only have one version being loaded not multiple versions that's probably botching up npm... surprised that isn't dealt with somehow, guess since you can't have multiple properties with the same name on an object perhaps last one wins but not sure, either way good to have just the one.shaunhusain

1 Answers

0
votes

Remove the extra rxjs entries in the dependencies. npm works by reading the dependencies list and semantic version numbers to determine what actual version of a particular dependency to install. Believe removing rxjs will alleviate the immediate issue of the npm warnings. Regarding the nested components it should probably be it's own question but either way would need to see the actual source.