对于我的emberjs应用程序,我希望预编译我的Handlebar模板,但是从终端运行Nodejs ember-precompile模块:
ember-precompile src/templates/*.handlebars -f public/js/templates.js
抛出此TypeError错误:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object #<Object> has no method 'appendFileSync'
at write (/usr/local/lib/node_modules/ember-precompile/bin/ember-precompile:25:10)
at /usr/local/lib/node_modules/ember-precompile/bin/ember-precompile:32:5
at Array.forEach (native)
at main (/usr/local/lib/node_modules/ember-precompile/bin/ember-precompile:31:14)
at Object.<anonymous> (/usr/local/lib/node_modules/ember-precompile/bin/ember-precompile:36:1)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
什么可能导致:TypeError:Object#没有方法'appendFileSync'?
答案 0 :(得分:0)
当我尝试将Handlebars更新到最新版本时,我也遇到了同样的问题 我做了以下步骤。
这适合我。