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

Can't launch node REPL anymore #34

Closed
gubikmic opened this issue Mar 14, 2019 · 8 comments
Closed

Can't launch node REPL anymore #34

gubikmic opened this issue Mar 14, 2019 · 8 comments
Labels

Comments

@gubikmic
Copy link

Hi, I'm stuck with the following error message that came up out of nowhere. I didn't even change anything that I remember but I can't launch a node REPL anymore:

~> node
internal/modules/cjs/loader.js:651
throw err;
^

Error: Cannot find module '/Users/mmg'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:862:12)
at internal/main/run_main_module.js:21:11

What works is env node and also launching a bash and then node.

I just reinstalled fisher, nvm, and fish-nvm but that didn't help.

Any ideas?

@FabioAntunes
Copy link
Owner

FabioAntunes commented Mar 14, 2019

I have never experienced that, will need more info.

Open a new terminal session and do:

which node

Then do:

node -v

Then do:

which node

post the results here.

After all of that can you also can you try to install a new node version and then doing nvm use VERSION_YOU_INSTALLED

@gubikmic
Copy link
Author

Thanks for your reply! Here's what I get:

 > which node
env: node: No such file or directory
 > node -v
v11.11.0
 > which node
/Users/mmg/.nvm/versions/node/v11.11.0/bin/node
 >

If I add an older node version and nvm use it, then the REPL works as expected.

@FabioAntunes
Copy link
Owner

Basically node repl is broken in nodejs from versions 11.10 and 11.11 for fish. If you install node from source you will be getting the same problem. Has nothing to do with fish-nvm.

@FabioAntunes
Copy link
Owner

I have created an issue here nodejs/node#26663 feel free to follow that.

@FabioAntunes
Copy link
Owner

Found the issue it turns out it's actually on me.

@FabioAntunes
Copy link
Owner

Fixed on the latest version, just pull latest version

@gubikmic
Copy link
Author

Awesome, thank you for the speedy fix!

@huuanh1987
Copy link

internal/modules/cjs/loader.js:651
throw err;
^

Error: Cannot find module 'prompt'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object. (/usr/local/lib/node_modules/react-native-cli/index.js:43:14)
at Module._compile (internal/modules/cjs/loader.js:799:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)

HELP ME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants