0

Like essentially a "global node_modules" or something similar, so when I run node by itself, I can always get, say the requestify package.

C:\> node
> var request=require('requestify');

Without "being in" a folder that already has requestify loaded into node_modules in that very same directory (ie, so I dont have to pepper every folder with a node_modules with requestify in it)

enorl76
  • 2,562
  • 1
  • 25
  • 38
  • Just realized this is a Possible duplicate of [NodeJS require a global module/package](https://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package) – enorl76 Jan 01 '19 at 21:45

1 Answers1

1

Try npm install with the -g flag.

Joshua M. Moore
  • 381
  • 6
  • 20
  • That doesnt work. Went to a folder without a node_modules, ran `npm install request -g` then typed `node` and then `var a = require("request")` and that failed, so clearly global node_modules isn't included in the search pattern – enorl76 Jan 01 '19 at 21:43