sindresorhus / guides

A collection of succinct guides - Public Domain
2.47k stars 458 forks source link

adds npm_package/lib to node_path #35

Closed kyle-hall closed 8 years ago

kyle-hall commented 8 years ago

I had to add this to the NODE_PATH to finish the process. Before I did, I got an error telling me my NODE_PATH and npm root were different and to make this change to fix that. It was the global installation of yo that gave this error message.

kyle-hall commented 8 years ago

@sindresorhus I'll get those comments fixed up. Thanks for looking at the PR

kyle-hall commented 8 years ago

@sindresorhus Suggested fixes have been made. Looks good in the preview.

sindresorhus commented 8 years ago

Actually, I'm not about this. Setting NODE_PATH is a pretty bad practice.

@SBoudrias Why do we require this again?

kyle-hall commented 8 years ago

@sindresorhus Could you explain why setting NODE_PATH is a bad practice?

sindresorhus commented 8 years ago

https://www.google.com/search?q=NODE_PATH+bad

SBoudrias commented 8 years ago

Why do we require this again?

We don't require it.

Yeoman supports it because some people rely on it. That being said, misconfigured NODE_PATH is the main source of issues with people not finding generators on their computer.

kyle-hall commented 8 years ago

@SBoudrias Okay, I was basing this on the error message from the global yo install. I thought the error meant it was required. Thanks for clarifying.