Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL requires fail on package resolve #4257

Closed
markfinger opened this issue Dec 12, 2015 · 6 comments
Closed

REPL requires fail on package resolve #4257

markfinger opened this issue Dec 12, 2015 · 6 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@markfinger
Copy link

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
└── immutable@3.7.5

I've reinstalled 5.2.0 with brew again and the same issues are continuing.

@markfinger
Copy link
Author

Node 5.2.0 was installed on both occasions with brew install node

@markfinger
Copy link
Author

Core libs are still resolved correctly:

~/Projects/test $ node
> require('path')
{ resolve: [Function],
  normalize: [Function],
  isAbsolute: [Function],
  join: [Function],
// ...

@cjihrig
Copy link
Contributor

cjihrig commented Dec 12, 2015

This was fixed in #4215.

@markfinger
Copy link
Author

Ah cool, is there any timeline on a patch release?

@cjihrig
Copy link
Contributor

cjihrig commented Dec 12, 2015

Probably next week.

@markfinger
Copy link
Author

Cool. Sounds great

@ChALkeR ChALkeR added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Dec 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

3 participants