所以我最近开始在一台linux机器(Ubuntu16.04)上工作,并遵循了这里的安装说明http://jsreport.net/downloads/。当我运行npm start——production时

    2016-09-13T16:51:57.134Z - info: Initializing jsreport in production mode using configuration file prod.config.json
2016-09-13T16:51:57.138Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-09-13T16:51:57.146Z - info: Searching for available extensions in /home/ross/rifiniti/optimo_ui/
2016-09-13T16:51:57.152Z - info: Extensions location cache not found, crawling directories
2016-09-13T16:51:57.317Z - error: Error occured during reporter init Error: ENOENT, no such file or directory '/home/ross/rifiniti/optimo_ui/ember/tmp/tree_merger-tmp_dest_dir-2yGnPLMA.tmp/optimo-ui/config'
    at Error (native)
    at Object.fs.statSync (fs.js:801:18)
    at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:51:21
    at Array.forEach (native)
    at Object.exports.walkSync (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
    at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/extensions/locationCache.js:50:20
From previous event:
    at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:90:8
From previous event:
    at Reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:69:30)
    at Reporter.reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/lib/extendInit.js:8:21)
    at Object.<anonymous> (/home/ross/rifiniti/optimo_ui/server.js:1:85)

我也不知道为什么。它在Mac上工作很好,但现在它正在寻找这个不存在的TMP文件。我不知所措,任何帮助都将不胜感激!

最佳答案

解决了的!
我所要做的就是删除ember中的tmp目录,然后它就工作了。

关于node.js - jsreport无法查找扩展,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39475332/

10-11 09:21