S
S
Sergey Krivochenko2017-04-14 16:03:25
Angular
Sergey Krivochenko, 2017-04-14 16:03:25

What to do with peer dependency?

Hello. Trying to deploy https://github.com/robwormald/ng-universal-demo. I do npm install. It all ended up like this:

nodejs_1  | npm ERR! network read ECONNRESET
nodejs_1  | npm ERR! network This is most likely not a problem with npm itself
nodejs_1  | npm ERR! network and is related to network connectivity.
nodejs_1  | npm ERR! network In most cases you are behind a proxy or have bad network settings.
nodejs_1  | npm ERR! network
nodejs_1  | npm ERR! network If you are behind a proxy, please make sure that the
nodejs_1  | npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
nodejs_1  | npm ERR! Linux 4.4.59-boot2docker
nodejs_1  | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
nodejs_1  | npm ERR! node v7.9.0
nodejs_1  | npm ERR! npm  v4.2.0
nodejs_1  | npm ERR! code ECONNRESET
nodejs_1  | npm ERR! errno ECONNRESET
nodejs_1  | npm ERR! syscall read

Found advice not to use HTTPS: npm install --registry http://registry.npmjs.org. Immediately the question is, what is the reason for this phenomenon? Could this be due to the fact that Node is installed in a Docker container in a virtual machine. Connection problems occur only here. I write in PHP, packages through Composer are put with a bang.
Everything seems to be better without HTTPS, but it still ends with WARNings:
nodejs_1 | +— UNMET PEER DEPENDENCY @angular/[email protected] 
nodejs_1 | +— [email protected] 
nodejs_1 | | +— [email protected] 
nodejs_1 | | `— [email protected] 
nodejs_1 | `— UNMET PEER DEPENDENCY [email protected] 
nodejs_1 | 
nodejs_1 | npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
nodejs_1 | npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 
nodejs_1 | npm WARN @angular/[email protected] requires a peer of [email protected]^0.8.4 but none was installed. 
nodejs_1 | npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
nodejs_1 | npm WARN [email protected] No description 
nodejs_1 | npm info ok

As I understand it, fseventsyou can close your eyes or just add it --no-optionalto the installation command. As for peer dependency , I read that they need to be installed by hand. I do in the same folder:
npm install @angular/core zone.js @angular/platform-server @angular/animations —registry http://registry.npmjs.org
Again, everything ends with a portion of WATNings:
nodejs_1 | +— UNMET PEER DEPENDENCY @angular/[email protected] 
nodejs_1 | +— UNMET PEER DEPENDENCY @angular/[email protected] (git://github.com/angular/core-builds.git#aae8cc4ee6219598ef..) 
nodejs_1 | +— @angular/[email protected] (git://github.com/angular/platform-server-builds.git#660f563..) 
nodejs_1 | `— UNMET PEER DEPENDENCY [email protected] 
nodejs_1 | 
nodejs_1 | npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
nodejs_1 | npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 
nodejs_1 | npm WARN @angular/[email protected] requires a peer of [email protected]^0.8.4 but none was installed. 
nodejs_1 | npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
nodejs_1 | npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. 
nodejs_1 | npm WARN [email protected] No description 
nodejs_1 | npm info ok

Thanks for the help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question