node.js - terminal won't open npm binary even if it's right there -


i have installed global npm package using sudo npm install mtemplate -g. mtemplate package appears in /usr/local/bin directory. shows when type ls in terminal in directory. can see in finder.

but when type mtemplate or /usr/local/bin/mtemplate in terminal (or variation thereof) get

no such file or directory

according docs should possible run mtemplate terminal. why isn't found when it's right there?

after head-scratching figured out myself... mtemplate in usr/local links mtemplate.js file in node_modules. .js file had windows line endings, , apparently node on mac won't execute those!

after converting line endings unix works...


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -