avh4 / elm-format

elm-format formats Elm source code according to a standard set of rules based on the official Elm Style Guide
BSD 3-Clause "New" or "Revised" License
1.31k stars 145 forks source link

elm-format not working on Mac #436

Open babakness opened 6 years ago

babakness commented 6 years ago

MacOS Sierra

Installed via Yarn, would not install via NPM. Node 8.2.1

Command: $ elm-format main.elm

Error:

internal/child_process.js:325
    throw errnoException(err, 'spawn');
    ^

Error: spawn EACCES
    at exports._errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:325:11)
    at exports.spawn (child_process.js:493:9)
    at Object.<anonymous> (/Users/me/.nvm/versions/node/v8.2.1/lib/node_modules/elm-format/bin/elm-format:4:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
wende commented 6 years ago

Same here

/Edit. Didn't work for me when installed with yarn. Installed it with npm, and started working properly

rtfeldman commented 6 years ago

Try this fix:

https://docs.npmjs.com/getting-started/fixing-npm-permissions

kachkaev commented 6 years ago

@babakness does it work now? Feel free to close this issue if yes 😉

What was the solution?