KrakenJS and Adaro or Engine-Munger or Dust... (grunt build and then npm start)

381 views Asked by At

So I'm trying to put my server on a production environment. I'm using kraken, and almost the same config at init. At development all works fine but then I do (I am on Windows 8.1 64bits):

set NODE_ENV=production
grunt build --force
npm start

For root files it works fine, the problem is for folders. I take this at command line:

127.0.0.1 - - [08/Dec/2014:05:55:41 +0000] "GET /back/login HTTP/1.1" 500 22 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36" Error: Could not load template at Object.onLoad (C:\Users\User\Desktop\MyProject\node_modules\engine-munger\view\js.js:38:22) at Object.cache.get (C:\Users\User\Desktop\MyProject\node_modules\engine-munger\lib\cache.js:59:14) at spclOnLoad (C:\Users\User\Desktop\MyProject\node_modules\engine-munger\lib\munger.js:75:9) at C:\Users\User\Desktop\MyProject\node_modules\adaro\lib\reader\file.js:62:16 at onChunk (C:\Users\User\Desktop\MyProject\node_modules\adaro\lib\patch\index.js:69:29) at Chunk.map (C:\Users\User\Desktop\MyProject\node_modules\dustjs-linkedin\lib\dust.js:587:7) at C:\Users\User\Desktop\MyProject\node_modules\adaro\lib\patch\index.js:91:39 at Object.dust.load [as __cabbage__] (C:\Users\User\Desktop\MyProject\node_modules\dustjs-linkedin\lib\dust.js:137:14) at Object.cabbage [as load] (C:\Users\User\Desktop\MyProject\node_modules\adaro\lib\patch\index.js:98:21) at Object.dust.render (C:\Users\User\Desktop\MyProject\node_modules\dustjs-linkedin\lib\dust.js:92:12)

It seems to not find the appropriate path or something like that. Also at config I have: http://pastebin.com/QsgG19Uz

I have posted in pastebin because its large. Any Idea how to make this work? Can NODE_ENV=development make troubles on a production server?

EDIT:

Here is the final output on "grunt build --force":

432 errors in 43 files Warning: Task "jshint:files" failed. Used --force, continuing. Running "clean:tmp" (clean) task Cleaning tmp...OK

Running "copyto:build" (copyto) task Copied 36 files (0 unchanged), created 4 folders

Done, but with warnings.

The thing is, I have tried the same with the Shopping Cart Example at Krakenjs website, and it gives mostly the same.

Also, It says warnings, not errors at final...

1

There are 1 answers

0
aredridel On

Oh, this is just fun: I bet embedded CSS and Javascript are setting off a compile error in dust. There's a lot of things in curly braces that look like dust tags there. It should be smart enough to tell the difference -- and for JS, probably is -- but CSS is pretty close to dust and I'm sure there's some ambiguity there.

Try externalizing your JS and CSS from the layout and see if that helps.