Closed
Description
Upgraded to 5.2.0 via brew, and REPL require
calls seem to fail at resolving paths:
~/Projects/test $ npm install immutable
~/Projects/test $ node
> require('immutable')
Error: Cannot find module 'immutable'
at Function.Module._resolveFilename (module.js:327:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:355:17)
at require (internal/module.js:13:17)
at repl:1:1
at REPLServer.defaultEval (repl.js:252:27)
at bound (domain.js:281:14)
at REPLServer.runBound [as eval] (domain.js:294:12)
at REPLServer.<anonymous> (repl.js:417:12)
at emitOne (events.js:83:20)
Relative file lookups still work in the REPL:
~/Projects/test $ touch test.js
~/Projects/test $ node
> require('./test.js')
{}
Package resolution works within eval strings:
~/Projects/test $ node -e "require('immutable')" -p
{ Iterable:
// excised for conciseness ...
}
Package resolution works within scripts:
~/Projects/test $ echo "console.log(require('immutable'));" > test2.js
~/Projects/test $ node test2.js
{ Iterable:
// excised for conciseness ...
}
Environment
OSX 10.10.5
~/Projects/test $ brew --version
Homebrew 0.9.5 (git revision b3139; last commit 2015-12-11)
~/Projects/test $ which node
/usr/local/bin/node
~/Projects/test $ ll /usr/local/bin/node
lrwxr-xr-x 1 markfinger admin 29 12 Dec 14:17 /usr/local/bin/node -> ../Cellar/node/5.2.0/bin/node
~/Projects/test $ node --version
v5.2.0
~/Projects/test $ npm --version
3.3.12
~/Projects/test $ npm ls
/Users/markfinger/Projects/test
└── [email protected]
I've reinstalled 5.2.0 with brew again and the same issues are continuing.