Closed nealoke closed 6 years ago
Hi @nealoke
I think you're on Windows so you can remove the first .
and then it will works for the first command. /node_modules/.bin/mjml index.mjml
And this PATH editing method is only for Linux/Mac users so that's why it doesn't work too
@iRyusa thanks for the fast response however trying to run
/node_modules/.bin/mjml /src/results/daily.mjml
gives me the following error: The system cannot find the path specified.
Do I need to do npm run
or something before the actual command?
I have no Windows bash to try here, are you in the folder where you've npm install
? Try to remove the first /
too maybe
Yes I am 😄 Also looking at my folder structure I can see that it is present in node_modules/.bin/mjml
.
Trying without the first /
gives me the following error:
'node_modules' is not recognized as an internal or external command,
operable program or batch file.
Quick question, is this in Windows cmd, Powershell, or Bash for Windows Subsystem?
@aakash-stockpile this is in the windows cmd (running inside vscode)
Did you tried with \
instead of /
?
Specifically, \node_modules\.bin\mjml \src\results\daily.mjml
@aakash-stockpile @iRyusa still not 😢 , i am currently using the gulp plugin and that works great 👍
node_modules\.bin\mjml -V
3.3.3
On my windows it's working are you sure you're in the good directory ?
There could be an mjml script line in package.json:
"scripts": {
"mjml": "mjml",
"lint": "eslint ."
},
Then we can do either
npm run mjml -- -V # must use -- before passing options
or
yarn mjml -V # if you prefer yarn to npm
This works because inside a package script, node_modules/.bin is automatically included in the searched paths.
I think it does work on top level package json script in dependencies are only available through npm explore mjml
CF NPM documentation :
Scripts from dependencies can be run with
npm explore <pkg> -- npm run <stage>
.
Ran into this same issue on Win10 x64. This worked for me in the end. Use \ instead of / and no preceeding \ in front of the node_modules.
node_modules\.bin\mjml testemail.mjml -o testemail.html
export command is valid only for unix shells. In Windows - use set instead of export
This following worked for me:
set PATH="${PATH}:${.\node_modules\.bin}"
Hi, I'm trying to set this up however it seems that I cannot get it to work when following the steps on the download page.
When trying to do
./node_modules/.bin/mjml index.mjml
it shows the following error in my console:Also get an error when trying to add it to the
PATH
:export PATH="$PATH:./node_modules/.bin"
Versions: mjml:
3.3.3
node:6.10.1
npm:3.10.9
Am I doing something wrong?