jscheid / prettier.el

Prettier code formatting for Emacs.
GNU General Public License v3.0
172 stars 12 forks source link

Building from source instructions #137

Closed arichiardi closed 2 months ago

arichiardi commented 2 months ago

Is your feature request related to a problem? Please describe.

Document how to build supplemental files.

Trying to install this package from source - I got this error:

(error "Cannot find supplemental file \"prettier-el.js.gz.base64\"")

I dug into the code and saw there is a Makefile that provides that but still npm i && make produces:

npm ERR! code 7 npm ERR! path /home/cokap/.config/emacs/lib/prettier/node_modules/node-zopfli-es npm ERR! command failed npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.0 npm ERR! gyp info using node@20.11.0 | linux | x64 npm ERR! gyp info find Python using Python version 3.12.4 found at "/usr/bin/python3" npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.0/node-v20.11.0-headers.tar.gz npm ERR! gyp http 200 https://nodejs.org/download/release/v20.11.0/node-v20.11.0-headers.tar.gz npm ERR! gyp http GET https://nodejs.org/download/release/v20.11.0/SHASUMS256.txt npm ERR! gyp http 200 https://nodejs.org/download/release/v20.11.0/SHASUMS256.txt npm ERR! gyp ERR! UNCAUGHT EXCEPTION npm ERR! gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#Object' ...

I am probably missing some requirements?


Describe the solution you'd like

A "build from source" section in the README probably would detail what I am missing.

Describe alternatives you've considered Trying to understand and solve the problem here :)

arichiardi commented 2 months ago

I am really blind, I'll add a PR for modifying HACKING.md shortly.