Handlebars compile operation not permitted

I'm trying to get Handlebars pre-compilation working on AppHarbor. We are following the instructions here which works on all out build machines except for AppHarbor. Here's the error log:

   CompileHandlebarsTemplates:
     Compiling Handlebars template files
     Executing handlebars  --output "templates.js" --min "D:\temp\iglbataj.o25\input\comp-prod-5d066abce08570e82575d1a1c877bd5c94d27b1c\WebApp\Templates"
     node "D:\temp\iglbataj.o25\input\comp-prod-5d066abce08570e82575d1a1c877bd5c94d27b1c\WebApp\Build\npm\node_modules\handlebars\bin\handlebars"  --output "templates.js" --min "D:\temp\iglbataj.o25\input\comp-prod-5d066abce08570e82575d1a1c877bd5c94d27b1c\WebApp\Templates"

     fs.js:679
       return binding.lstat(pathModule._makeLong(path));
                      ^
 5>EXEC : error : EPERM, operation not permitted 'D:\temp' [D:\temp\iglbataj.o25\input\comp-prod-5d066abce08570e82575d1a1c877bd5c94d27b1c\WebApp\WebApp.csproj]
         at Object.fs.lstatSync (fs.js:679:18)
         at Object.realpathSync (fs.js:1265:21)
         at tryFile (module.js:142:15)
         at Function.Module._findPath (module.js:181:18)
         at Function.Module._resolveFilename (module.js:336:25)
         at Function.Module._load (module.js:280:25)
         at Function.Module.runMain (module.js:497:10)
         at startup (node.js:119:16)
         at node.js:901:3

We have checked in the node.js handlebars module. Tried invoking it using node.exe installed on AppHarbor as well as checking in both x64 and x86 versions of node.exe. None of them works. Tried replicating really long paths locally to see if the problem is that still builds locally with long paths. Even tried outputting to default output instead of a file to no avail. At this point I am stuck on this issue. Please help.

this is a permission problem.

Probably that your node process don't have the right permission to read the files or write in the destination folder.

You could force it with sudo, but that's no really a solution. So check the permission and make sure the node process has access to writing and reading on the related directory/files.

You can google chmod and chown for instruction on how to change permissions. (I can't help you any further without more detail on your system architecture)