gpt4 book ai didi

node.js - grunt-contrib-jshint 警告 : path must be a string;

转载 作者:IT老高 更新时间:2023-10-28 23:08:56 28 4
gpt4 key购买 nike

我一直在尝试使用 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(使用括号)验证了文件并且它工作得很好好吧,网站也可以正常工作。

到目前为止我做了什么。

  • 未安装 node.js 和 node 模块 3 次(每次都尝试不同的东西)。
  • 试图将我的 grunt 任务限制为简单地验证一个非常简单的 js 文件,并且也不起作用,这意味着这与代码或我的 gruntfile.js 无关。

最佳答案

我通过将 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com