Nikola Brežnjak blog - Tackling software development with a dose of humor
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Home
Daily Thoughts
Ionic
Stack Overflow
Books
About me
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Nikola Brežnjak blog - Tackling software development with a dose of humor
NodeJS

npm ERR! peerinvalid The package node-inspector does not satisfy its siblings’ peerDependencies requirements

Recently I was reinstalling ionic and cordova with:

npm install -g cordova ionic

but I got the following error:

    E:\IonicTesting>npm install -g cordova ionic
    npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tre
    e
    C:\Users\Nikola\AppData\Roaming\npm\cordova -> C:\Users\Nikola\AppData\Roaming\npm\node_modules\cordova\bin\cordova
    npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
    npm WARN installMany normalize-package-data was bundled with [email protected], but bundled package wasn't found in unpacked tre
    e
    C:\Users\Nikola\AppData\Roaming\npm\ionic -> C:\Users\Nikola\AppData\Roaming\npm\node_modules\ionic\bin\ionic
    npm WARN unmet dependency C:\Users\Nikola\AppData\Roaming\npm\node_modules\generator-ionic requires cordova@'^4.2.0' but
     will load
    npm WARN unmet dependency C:\Users\Nikola\AppData\Roaming\npm\node_modules\cordova,
    npm WARN unmet dependency which is version 5.1.1
    npm ERR! Windows_NT 6.1.7601
    npm ERR! argv "C:\\NodeJS\\\\node.exe" "C:\\NodeJS\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "cordova" "ionic"
    
    npm ERR! node v0.12.7
    npm ERR! npm  v2.11.3
    npm ERR! code EPEERINVALID
    
    npm ERR! peerinvalid The package node-inspector does not satisfy its siblings' peerDependencies requirements!
    npm ERR! peerinvalid Peer [email protected] wants node-inspector@~0.7.0
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     E:\IonicTesting\npm-debug.log

At first I thought the reason is that I may have had an older version of node or npm but wasn’t the case because my versions were up to date (date of this post: 03.08.2015):

E:\IonicTesting>node -v
v0.12.7
E:\IonicTesting>npm -v
2.11.3

Also, I did try:

npm update -g

and

npm cache clean

as noted in the few StackOverflow answers, but it didn’t help. After a bit of googling and messing around I realized (an idea came from this StackOverflow answer) that I could try uninstalling the dependencies which were messing with me:

npm uninstall -g node-inspector
npm uninstall -g strong-cli
npm install -g generator-karma

After this I ran

npm update -g

and then, to finally install Ionic and Cordova, I ran:

npm install -g cordova ionic

And, what do you know – it worked. Hope this helps someone!

CodeProject, Quick tips, Wordpress

How to add excerpts to your WordPress blog homepage in a TwentyThirteen theme and not break the Codeproject importer

As you may know, CodeProject has a thing called Technical blogs which lets you publish your post on their site too, and thus widening the range of potential readers.

Thanks to a great plugin by hjgode you can automatically import your posts.

However, recently I wanted just to show excerpts of the posts on my blog homepage and in the archives. The problem was that that stopped the importer from collecting the posts that are marked with the codeproject category because the posts were too short according to their rules (1000 words minimum).

I solved this in my  TwentyThirteen theme by doing slight changes in content.php (around line 33), which by default looks like this:

<?php if ( is_search() ) : // Only display Excerpts for Search ?>

This line displays excerpts only on a search page, and to show excerpts on homepage I did:

<?php if ( is_search() || is_home() ) :  ?>

You just have to make sure that you don’t include the

is_category()

and you’re all set.

True, you could further optimize this in a way that you would show excerpts for all other categories except “codeproject”.

Recent posts

  • Discipline is also a talent
  • Play for the fun of it
  • The importance of failing
  • A fresh start
  • Perseverance

Categories

  • Android (3)
  • Books (114)
    • Programming (22)
  • CodeProject (35)
  • Daily Thoughts (77)
  • Go (3)
  • iOS (5)
  • JavaScript (127)
    • Angular (4)
    • Angular 2 (3)
    • Ionic (61)
    • Ionic2 (2)
    • Ionic3 (8)
    • MEAN (3)
    • NodeJS (27)
    • Phaser (1)
    • React (1)
    • Three.js (1)
    • Vue.js (2)
  • Leadership (1)
  • Meetups (8)
  • Miscellaneou$ (77)
    • Breaking News (8)
    • CodeSchool (2)
    • Hacker Games (3)
    • Pluralsight (7)
    • Projects (2)
    • Sublime Text (2)
  • PHP (6)
  • Quick tips (40)
  • Servers (8)
    • Heroku (1)
    • Linux (3)
  • Stack Overflow (81)
  • Unity3D (9)
  • Windows (8)
    • C# (2)
    • WPF (3)
  • Wordpress (2)

"There's no short-term solution for a long-term result." ~ Greg Plitt

"Everything around you that you call life was made up by people that were no smarter than you." ~ S. Jobs

"Hard work beats talent when talent doesn't work hard." ~ Tim Notke

© since 2016 - Nikola Brežnjak