HI WELCOME TO KANSIRIS

NPM: npm-cli.js not found when running npm

Leave a Comment

Problem

Usually I can install a library using npm but today when installing yeoman I encountered this errors. Please help to figure out what's root cause.

D:\Works\phonegap\ionic\todo>npm install -g yo
    module.js:340
    throw err;
          ^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'

at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

I looked into the folder:

C:\Program Files\nodejs\node_modules\npm\bin\

but don't see node_modules folder as the error described.

I also try to find npm-cli.js and see it's actually in C:\Program Files\nodejs\node_modules\npm\bin\


solution

It turns out the issue is due to the wrong path of node in system variable. The path is currently pointing to

(I really don't know when I modified it)

C:\Program Files\nodejs\node_modules\npm\bin

so I change to

C:\Program Files\nodejs

and it works like a charm.

tips for career growth

Leave a Comment

Politics - You should promote yourself. Take initiative and move forward . take advantage and   make use of opportunities and move ahead of everyone. To take yourself to a position so that your friends would praise you for your qualification and Your enemies fear you. You should keep an eye on friends and understand the weakness of the enemies and loyalty of friends. You should destroy their strength by making them fight one another. You should sometimes present suffering and scarcity even during the period of happiness and abundance. You should understand the geography and history properly. No if or buts. Be on level with time. 

Let your enemy make mistakes, do not provoke or angry the enemy. Always keep friends away from enemies. Don't break the hearts of the friends.don't be afraid of the wealthy people dont scare poor people, don't spare cruel people, don't harass the  innocent. Take care of the rights of the people. flattery always pleases famous people. Try to please ten as much as you can. When they ask you what you need, your desire. Keep your eyes open and mouth shut so you can understand other ideas.

Shortcut keys for double click, left click, and right click without a mouse in Windows 10

Leave a Comment

 The o key Opens the selected shortcut when right clicking and the the p displays the Properties.

Have you selected the option to Underline the keyboard shortcuts and access keys?

1. Press the WinKey + X to display the system menu and select Control Panel.

2. Click the Ease of Access Center.

 select mouse turm on control you mouse with keyboard

3. Select the Make the Keyboard easier to use link.

4. In the Make it easier to use keyboard shortcuts section, place a check mark in the Underline Keyboard Shortcuts and Access Keys option.

 Shortcut keys for mouse in number lock 

left click is  press  / +5

right click is  press  -+5

double click is  press  +