Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch node REPL in emacs

Tags:

node.js

emacs

I am new to using emacs and am trying to launch a node REPL in inferior mode to interactively run JS alongside my code. When I try running the command C-c!, I receive an error in the buffer saying that C-c! is undefined. I wasn't able to find an answer online (which is probably a function of me not using the proper search terms) and I was hoping someone could point me in the right direction.

like image 937
g.humpkins Avatar asked Feb 12 '26 15:02

g.humpkins


1 Answers

C-c ! is specific to the Python REPL. For node.js you need to type M-x nodejs-repl.

This requires the package nodejs-repl, found in Marmalade and MELPA; to install it, make sure you have one of those repositories set up, e.g. (from http://www.emacswiki.org/emacs/ELPA):

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("melpa" . "http://melpa.milkbox.net/packages/")))

Then type M-x package-install RET nodejs-repl RET.

like image 173
echristopherson Avatar answered Feb 15 '26 22:02

echristopherson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!