首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >jsreport“报表初始化时出错”

jsreport“报表初始化时出错”
EN

Stack Overflow用户
提问于 2018-05-17 05:30:22
回答 2查看 549关注 0票数 0

我只是按照here的安装说明在node.js上设置jsreport。直到最后一步,一切都很顺利:

代码语言:javascript
复制
jsreport start

出现以下错误的地方:

代码语言:javascript
复制
2018-05-16T20:56:19.374Z - info: Initializing jsreport@2.0.0 in development mode using configuration file: jsreport.config.json
2018-05-16T20:56:19.378Z - info: Searching for available extensions in C:\Users\Mauro\
2018-05-16T20:56:19.382Z - info: Extensions location cache not found, crawling directories
2018-05-16T20:56:19.395Z - error: Error occured during reporter init TypeError: Cannot read property 'forEach' of undefined
    at Object.exports.walkSync (C:\Users\Mauro\node_modules\jsreport-core\lib\util\util.js:46:10)
    at Object.get (C:\Users\Mauro\node_modules\jsreport-core\lib\extensions\locationCache.js:22:22)
    at <anonymous>
Error: An error has occurred when trying to initialize jsreport..
    at instance.init.then.catch (C:\Users\Mauro\node_modules\jsreport-cli\lib\instanceHandler.js:31:29)
    at <anonymous> {"originalError":{}}
(Original) TypeError: Cannot read property 'forEach' of undefined
    at Object.exports.walkSync (C:\Users\Mauro\node_modules\jsreport-core\lib\util\util.js:46:10)
    at Object.get (C:\Users\Mauro\node_modules\jsreport-core\lib\extensions\locationCache.js:22:22)
    at <anonymous> {}

我正在尝试在Windows 10上安装。任何变通方法都将不胜感激。

EN

回答 2

Stack Overflow用户

发布于 2018-05-17 20:45:09

请将jsreport安装到专用目录中。

比如c:\work\myapp

将jsreport安装到用户的主页会导致当前的一些权限问题。

票数 0
EN

Stack Overflow用户

发布于 2018-05-18 04:21:51

我找到了一个解决方法,您可以像这样修改...\node_modules\jsreport-core\lib\util.js文件以使jsreport start命令正常工作:

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50380181

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档