作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我一直在尝试使用 jshint grunt 模块来验证我的代码,但我总是收到以下错误:
Running "jshint" task
[D] Task source: C:\Coursera\03. Intro Angular JS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.js
Running "jshint:all" (jshint) task
[D] Task source: C:\Coursera\03. Intro Angular JS\conFusion\node_modules\grunt-contrib-jshint\tasks\jshint.js
Verifying property jshint.all exists in config...OK
Files: Gruntfile.js, app/scripts/app.js
Options: force=false, reporterOutput=null, jshintrc=".jshintrc", reporter={}
Warning: Path must be a string. Received { toString: [Function], reporter: [Function] } Use --force to continue.
问题是,即使使用 --verbose 和 -debug,它也没有显示任何可以解决错误的方法,只是“路径必须是一个字符串”,我使用 JSLint(使用括号)验证了文件并且它工作得很好好吧,网站也可以正常工作。
到目前为止我做了什么。
最佳答案
我通过将 grunt-contrib-jshint 从“0.10.0”更新为“0.12.0”解决了这个问题。
关于node.js - grunt-contrib-jshint 警告 : path must be a string;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36435889/
我是一名优秀的程序员,十分优秀!