madewithlove / prettier-plugin-reasonml

Wrapper plugin adding refmt support to Prettier
MIT License
12 stars 1 forks source link

try use this lib, but not working #1

Open enieber opened 5 years ago

enieber commented 5 years ago

I try instalation using yarn and npm but the erros is equals. my config is:

the message erros is:

src/Index.re
[error] src/Index.re: Error: spawnSync refmt ENOENT
[error]     at Object.spawnSync (internal/child_process.js:1041:20)
[error]     at Object.spawnSync (child_process.js:607:24)
[error]     at module.exports.sync (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier-plugin-reasonml/node_modules/execa/index.js:334:30)
[error]     at format (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier-plugin-reasonml/src/parse.js:4:5)
[error]     at Object.parse (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier-plugin-reasonml/src/parse.js:13:11)
[error]     at Object.parse (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier/bin-prettier.js:9743:19)
[error]     at coreFormat (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier/bin-prettier.js:13258:23)
[error]     at format (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier/bin-prettier.js:13516:73)
[error]     at formatWithCursor (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier/bin-prettier.js:13532:12)
[error]     at Object.formatWithCursor (/home/enieber/.fnm/node-versions/v12.11.1/installation/lib/node_modules/prettier/bin-prettier.js:44213:15)
Anahkiasen commented 5 years ago

This library just wraps around refmt, if you run it directly on your file does it throw the same error?

enieber commented 5 years ago

I don't know how to run only refmt because I starting with reasonml now

Anahkiasen commented 5 years ago

If I recall you use refmt itself like this, but it's not really well documented on the ReasonML website:

refmt src/Index.re --in-place