I use Emacs 24.2. I've installed js-comint
and js-mode
from MELPA, executed run-js
, and now in REPL instead of >
sign i have this gibberish:
^[[1G> ^[[0K^[[3G
The REPL itself in Inferior Javascript mode works just fine, just the >
sign is changed. If you enter unfinished expression, it even prints ^[[1G... ^[[0K^[[5G
. The ^[
are system characters, that are not copied with copy-paste, i add them for you to have an idea.
In my init-file:
(require 'js-comint)
(setq inferior-js-program-command "nodejs")
In terminal calling nodejs
produces working REPL.
Why prompt behaves this way? What should i do to correct this?
Emacs comes with a major mode for JavaScript named js-mode . While it is a good major mode, we'll be using js2-mode instead, an external package that extends js-mode and provides a very interesting feature: instead of using regular expressions, it parses buffers and builds an AST for things like syntax highlighting.
Node. js allows you to run JavaScript on the server.
Node. js provides a very vast framework and includes many libraries to support every need a developer might come across. Next. js enhances the user experience by introducing server-side rendering with a lower threshold for developers.
Node. js, to a greater extent than most application servers, is designed for scalability, and its web server side can handle a lot of Internet traffic reasonably well.
Just add one line in your .emacs:
(setenv "NODE_NO_READLINE" "1")
Answer come from this post: Node.js prompt '>' can not show in eshell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With