1

get:

✖ NODE_PATH matches the npm root
npm global root value is not in your NODE_PATH

during Yoeman installation

npm install --global yo generator-react-webpack
ChaosPredictor
  • 2,885
  • 1
  • 24
  • 35
  • 1
    I literally Google'd your error and found this link: https://github.com/yeoman/yo/issues/304. Pretty sure its for Mac but for Linux its the same. For Windows, you can use this: http://stackoverflow.com/a/9546345/7476755. – Gambit Mar 08 '17 at 15:23
  • The error I got on Linux – ChaosPredictor Mar 08 '17 at 15:25
  • Try this then: http://stackoverflow.com/a/31234895/7476755. Seriously, use Google. – Gambit Mar 08 '17 at 15:26

2 Answers2

2

I did:

yo doctor

and got recommendation for:

echo "export NODE_PATH=$NODE_PATH:/home/pubudurw/local/install/node/lib/node_modules" >> ~/.bashrc && source ~/.bashrc

source: link

ChaosPredictor
  • 2,885
  • 1
  • 24
  • 35
2

Run:

yo doctor

After that it will indicate the same issue:

✖ NODE_PATH matches the npm root
npm global root value is not in your NODE_PATH

At the end line will have two suggestions to fix (related your home directories):

[Fix] Append the npm root value to your NODE_PATH variable
Add this line to your .bashrc
    export NODE_PATH=$NODE_PATH:/home/[YOUR HOME DIR]/.nvm/versions/node/v8.11.1/lib/node_modules
  Or run this command
    echo "export NODE_PATH=$NODE_PATH:/home/[YOUR HOME DIR]/.nvm/versions/node/v8.11.1/lib/node_modules" >> ~/.bashrc && source ~/.bashrc

Try to run the last one. Run the yo doctor again. The expected message will be(fixed):

Everything looks all right!
Andre Araujo
  • 1,643
  • 1
  • 18
  • 35