Trying prettier in emacs give errors (OSX)
See original GitHub issueHere the error when trying to apply prettier on a buffer
prettier errors:
/Users/trigrou/.nvm/versions/node/v5.5.0/lib/node_modules/prettier/bin/prettier.js:4
const fs = require("fs");
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
not sure exactly what’s the problem
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Can't get prettier-js working
Running M-q results in the error: Autoloading failed to define function prettier and using M-x prettier-js again results in Searching for ...
Read more >prettier - require in .emacs config file not working
I have installed prettier for emacs using the instructions here: https://github.com/prettier/prettier-emacs. Doing which prettier gives me ...
Read more >radian-software/straight.el - Gitter
hey all, I'm trying to set up straight on a branch new mac OS emacs 27.1 installation. Getting the following error: Debugger entered--Lisp...
Read more >Emacs 29 is nigh
I personally try to use eshell for everything. As far as different tabs/splits emacs should be able to do that. Can you give...
Read more >Formatting code with Prettier
The reason for being used prettier is given below: ... Providing the error message if the code is not followed any syntax, will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If anybody is wondering I had a similar issue for Sublime Text 3 and ended up setting the project settings to be using the same node as the prettier was installed with:
This was not super obvious to me when installed it and wanted to use it with my editor.
Looks like that’s an issue with your $PATH. Since this is not an issue related to prettier anymore, I am closing this issue.