"Developing in the monorepo" instructions incomplete
I ran into a problem with the previous startup instructions.
_scripts/build.sh and friends assume tools in ../node_modules/.bin relative to _scripts.
https://github.com/calebmer/node_modules/blob/770648585a7f96aa75604578146a08a8aec8bbf6/_scripts/build.sh#L7-L9
Normally npm install in a directory that contains a package.json will create a node_modules subdirectory, but not when the current directory is named node_modules.
Renaming the node_modules directory to something else, running npm install, and then changing the directory back does not work because require(...) will not look for a node_modules subdirectory inside a node_modules directory.
This happens because of how require(...) searches ancestor-ward:
NODE_MODULES_PATHS(START)
- let PARTS = path split(START)
- let I = count of PARTS - 1
- let DIRS = [GLOBAL_FOLDERS]
- while I >= 0, a. if PARTS[I] = "node_modules" CONTINUE
The changed setup instructions address the problem by cloning into a different directory name so that there is no node_modules path element on "$PWD".