4

I am getting an error while compiling a jade file on my mac. I have already read too many blog posts but the problem still exits.

Here is a screenshot of the error I am getting:

Setup Jade using webstorm Mac

Can anyone tell me how i can setup jade in Webstrom MAC.

In terminal when i am trying to compile using this command i got error no: 156

mandeepgill-macpro:~ mandeepgill$ cd /Applications/MAMP/htdocs
mandeepgill-macpro:htdocs mandeepgill$ cd HTMLCodes
mandeepgill-macpro:HTMLCodes mandeepgill$ cd Sports
mandeepgill-macpro:Sports mandeepgill$ cd public_html
mandeepgill-macpro:public_html mandeepgill$ jade main.jade main.html



/usr/local/lib/node_modules/jade/bin/jade:156
              if (err) throw err;
                             ^
Error: EISDIR, open 'main.html'
mandeepgill-macpro:public_html mandeepgill$
Mandeep Gill
  • 390
  • 5
  • 12

1 Answers1

0

The EISDIR error is caused when a Node application expects a file, but gets a directory.

This particular instance of that error was thrown by this block of code:

fs.writeFile(path, output, function(err){
          if (err) throw err;
          console.log('  \033[90mrendered \033[36m%s\033[0m', path);
        });

You can tell because it's not error number 156, but the line number of the relevant code.

Do you, by any chance have a directory named main.html in /Applications/MAMP/htdocs/HTMLCodes/Sports/public_html?

Also, you should be able to just execute the command, jade main.jade without the second argument. That would seem to make your life easier.

Though if your dead set on using Webstorm on a Mac, this configuration should work equally well, or to keep it really simple, just put $FileName$ in arguments and get rid of the output paths.

This seems to have been a fairly common problem with Webstorm watchers though, so you might want to just use the command line jade --watch.

Community
  • 1
  • 1
Jason Nichols
  • 3,739
  • 3
  • 29
  • 49