ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim <timrs2...@gmail.com>
Subject Can't require('fs') in ambari-web controllers
Date Sat, 08 Nov 2014 19:44:48 GMT
Hello again,

I'm trying to do something like "var fs = require('fs')" somewhere in
ambari-web so that I can write to a file in a controller. Adding it to
"ambari-web\app\controllers\wizard\step3_controller.js", I get

Uncaught Error: Cannot find module "fs" from
"controllers/wizard/step3_controller"


I get similar errors/exceptions when adding to app.js or installer.js too.
My question is, how can I either require this module or write to a file in
one of ambari's controllers?

Is it likely that something is wrong with my setup/node installation? It
seems that this should always work.

I've tried this on a clean ambari-web without any of my changes, following
https://cwiki.apache.org/confluence/display/AMBARI/Coding+Guidelines+for+Ambari
to acquire and build it.

Thanks,
Tim Schoenheider

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message