angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.68k stars 11.98k forks source link

install of angular-cli results in unmeet peer dependencies. Installing a peer does not resolve #1941

Closed lebsral closed 7 years ago

lebsral commented 7 years ago

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) OSX 10.11.6
  2. Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here: ng --version Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. angular-cli: 1.0.0-beta.11-webpack.8 node: 6.5.0 os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc. Just ran npm install -g angular-cli@webpack
  4. The log given by the failure. Normally this include a stack trace and some more information. see below
  5. Mention any other details that might be useful. I also tried clearing the npm cache but the results were the same.

larsb-concourse:~ larsb$ npm install -g angular-cli@webpack
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
/usr/local/lib
└─┬ angular-cli@1.0.0-beta.11-webpack.8 
  ├── UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
  ├── UNMET PEER DEPENDENCY tslint@^3.0.0
  ├── UNMET PEER DEPENDENCY typescript@2.0.2
  ├── UNMET PEER DEPENDENCY webpack@2.1.0-beta.21
  └── UNMET PEER DEPENDENCY zone.js@^0.6.17

npm WARN tslint-loader@2.1.5 requires a peer of tslint@^3.0.0 but none was installed.
npm WARN string-replace-loader@1.0.3 requires a peer of webpack@1.x.x || 2.x.x but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of @angular/platform-server@^2.0.0-rc.5 but none was installed.
npm WARN @angular/tsc-wrapped@0.2.2 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/core@2.0.0-rc.6 requires a peer of zone.js@^0.6.17 but none was installed.
npm WARN tsickle@0.1.6 requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
larsb-concourse:~ larsb$ npm install -g zone.js@^0.6.17
/usr/local/lib
└── zone.js@0.6.17 

larsb-concourse:~ larsb$ npm install -g angular-cli@webpack
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package has been discontinued in favor of lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
/usr/local/bin/ng -> /usr/local/lib/node_modules/angular-cli/bin/ng
/usr/local/lib
└─┬ angular-cli@1.0.0-beta.11-webpack.8 
  ├── UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
  ├── UNMET PEER DEPENDENCY tslint@^3.0.0
  ├── UNMET PEER DEPENDENCY typescript@2.0.2
  ├── UNMET PEER DEPENDENCY webpack@2.1.0-beta.21
  └── UNMET PEER DEPENDENCY zone.js@^0.6.17

npm WARN string-replace-loader@1.0.3 requires a peer of webpack@1.x.x || 2.x.x but none was installed.
npm WARN tslint-loader@2.1.5 requires a peer of tslint@^3.0.0 but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/compiler-cli@0.5.0 requires a peer of @angular/platform-server@^2.0.0-rc.5 but none was installed.
npm WARN @angular/tsc-wrapped@0.2.2 requires a peer of typescript@^1.9.0-dev but none was installed.
npm WARN @angular/core@2.0.0-rc.6 requires a peer of zone.js@^0.6.17 but none was installed.
npm WARN tsickle@0.1.6 requires a peer of typescript@^1.8.0 || ^1.9.0-dev but none was installed.
filipesilva commented 7 years ago

Dupe of https://github.com/angular/angular-cli/issues/1560#issuecomment-240913794. Other problems seem related to the upgrade of webpack betas, which is now has better instructions in https://github.com/angular/angular-cli#webpack-update.

ashish173 commented 7 years ago

@JohnMcGuinness solution fixed the issue for me.

rfarina commented 7 years ago

I struggled with this quite a bit as well. What seemed to work for me was to delete node_modules, and run ng init. I actually followed the following:

It worked for me with a similar solution to @M4ttsson.

Changed the typescript value in my package.json to "2.0.0" Completely removed node_modules folder ran ng init, skipped everything ng serve

rfarina commented 7 years ago

I take it back... back to ground zero...

lcrespom commented 7 years ago

Has anyone managed to install angular-cli as a local dependency? That is without the "-g". Maybe there should be a separate issue for that?

rfarina commented 7 years ago

Thought I'd put this out there... I was getting the same warnings as everyone described. In my code, I am getting 2 messages:

  1. Promise name not found
  2. Experimental Support for Decorators message

I felt this meant that Promises would not work. I also don't understand why I get the "Experimental Decorator" message.

However, Promises DO work, even though it claims that the name is not found.

Any ideas? Thanks promisenotfound

experimentalsupportmsg

lcrespom commented 7 years ago

@rfarina, I think that is just a bug in Visual Studio Code, totally unrelated. I keep getting the same problems without angular-cli, I just restart Visual Studio and the problem disappears :-)

M4ttsson commented 7 years ago

I had this problem too. Vs code used an older version of typescript than my project. So it showed these errors but when compiled with the project version everything was fine. I changed vs code typescript version and the problem went away, add the setting typescript.tsdk and point it to the path of node_modules typescript location.

rfarina commented 7 years ago

@lcrespom, that's funny. I ONLY get it in the angular-cli versions :) As an update, I found that by commenting out the @Injectable() method, the squiggly lines go away and the code still runs. It's almost as if it's just not needed. experimentalsupportmsgwithinjectablecommentedout

rfarina commented 7 years ago

@lcrespom @M4ttsson With both your help and the suggestion of @M4ttsson, I modified the vs code workspace settings for the typescript location. By default it is set to "null". I set it to the following, reloaded vs code, and all seems to be working as expected with both Decorators and Promise, etc.

"typescript.tsdk": "./node_modules/typescript/lib"

notfoundsolution

amarcupertino commented 7 years ago

+-- UNMET PEER DEPENDENCY @angular/common@^2.0.0 +-- UNMET PEER DEPENDENCY @angular/core@^2.0.0 +-- UNMET PEER DEPENDENCY @angular/http@^2.2.0 `-- @angular2-material/core@2.0.0-alpha.8-2

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN @angular/material@2.0.0-beta.1 requires a peer of @angular/core@^2.2.0 but none was installed. npm WARN @angular/material@2.0.0-beta.1 requires a peer of @angular/common@^2.2.0 but none was installed. npm WARN @angular/material@2.0.0-beta.1 requires a peer of @angular/http@^2.2.0 but none was installed. npm WARN @angular2-material/core@2.0.0-alpha.8-2 requires a peer of @angular/core@^2.0.0 but none was installed. npm WARN @angular2-material/core@2.0.0-alpha.8-2 requires a peer of @angular/common@^2.0.0 but none was installed. npm WARN angular2-demo@1.0.0 No description npm WARN angular2-demo@1.0.0 No repository field.

amarcupertino commented 7 years ago

Installing angular material design but this issue

Ehasaniceiu04 commented 7 years ago

I am facing this kind of issue

jay12gore commented 6 years ago

Issue : @angular/compiler-cli@5.0.2 requires a peer of @angular/compiler@5.0.2 but none was installed

Solution to Above issue is

  1. Go to package.json file and change the version of compiler-cli from "@angular/compiler-cli": "^5.0.0",to "@angular/compiler-cli": "^5.0.2",
vargalas commented 6 years ago

Yeah, develop your in-house solution instead.

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.