Windows NodeJS:总是得到“错误:ENOENT:没有这样的文件或目录,打开”或“错误:EACCES:权限被拒绝,打开”(Windows NodeJS: always get either “Error: ENOENT: no such file or directory, open” or “Error: EACCES: permission denied, open”)
这是我的代码:
var fs = require('fs'); var util = require('util'); var logFile = fs.createWriteStream('C:/text.txt', { flags: 'a' }); // Or 'w' to truncate the file every time the process starts. var logStdout = process.stdout; console.log = function () { logFile.write(util.format.apply(null, arguments) + '\n'); logStdout.write(util.format.apply(null, arguments) + '\n'); } console.error = console.log;
无论我输入什么而不是“C:/text.txt”,我都会得到
错误:ENOENT:没有这样的文件或目录,打开
要么
错误:EACCES:权限被拒绝,打开
我尝试了诸如“以管理员身份运行”和“提升”之类的所有内容,但是当它不是第二条错误消息时,它就是第一条; 当它不是第一个时,它就是第二个。
我很困惑
Here is my code:
var fs = require('fs'); var util = require('util'); var logFile = fs.createWriteStream('C:/text.txt', { flags: 'a' }); // Or 'w' to truncate the file every time the process starts. var logStdout = process.stdout; console.log = function () { logFile.write(util.format.apply(null, arguments) + '\n'); logStdout.write(util.format.apply(null, arguments) + '\n'); } console.error = console.log;
No matter what I type instead of "C:/text.txt" I either get
Error: ENOENT: no such file or directory, open
or
Error: EACCES: permission denied, open
I tried everything such as "run as administrator" and "elevate", but when it's not the second error message, it's the first one; and when it's not the first one, it's the second one.
I'm soooo confused
原文:https://stackoverflow.com/questions/44909672
最满意答案
SonarQube没有Matlab插件。
如果您决定自己开发插件(这不是一项小事),那么您将不需要PMD。 看看PHP或CSS插件的源代码,了解如何入门:
或者,您也可以向PMD添加对Matlab语言的支持,然后开发SonarQube“Matlab PMD”插件。 这没有意义,除非你真的想因为某些原因与PMD集成。 在PMD http://pmd.sourceforge.net/pmd-5.3.2/pmd-matlab/index.html中似乎目前对Matlab的支持非常有限 - 即只是一个词法分析器,但没有解析器或规则。
There is no Matlab plugin for SonarQube.
If you decide to develop the plugin yourself (which is not a small undertaking), then you will not need PMD. Have a look at the PHP or CSS plugins source code to know how to get started:
Alternatively, you can also add support of the Matlab language to PMD, and then develop a SonarQube "Matlab PMD" plugin. This does not make sense, unless you really want to be integrated with PMD for some reason. There seems currently to be very limited Matlab support in PMD http://pmd.sourceforge.net/pmd-5.3.2/pmd-matlab/index.html - i.e. just a lexer, but no parser nor rules.
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
SonarQube 6.2提供了在全局级别注册多达10个URL的功能,以及在服务器端处理分析报告后,在项目级别再注册10个URL。 SonarQube 6.2 offers the ability to register up to 10 URLs at the global level and an additional 10 at the project level to be POSTed to once the analysis report has been processed server-si ...
-
哪个版本的sonarqube for depereciated delphi插件?(which version of sonarqube for depereciated delphi plugin?)[2024-01-03]
我们测试并运行当前版本的Sonar: 与SonarQube 4.5.x和SonarQube 5.1.2兼容 https://github.com/fabriciocolombo/sonar-delphi 发布: https : //github.com/fabriciocolombo/sonar-delphi/releases JAR: https : //github.com/fabriciocolombo/sonar-delphi/releases/download/0.3.3-SNAPSHOT/son ... -
是否有一个插件可以在Sonarqube中解析和集成Matlab?(Is there a plugin for parsing and integrating Matlab in Sonarqube?)[2023-05-17]
SonarQube没有Matlab插件。 如果您决定自己开发插件(这不是一项小事),那么您将不需要PMD。 看看PHP或CSS插件的源代码,了解如何入门: https://github.com/SonarCommunity/sonar-php https://github.com/SonarCommunity/sonar-css 或者,您也可以向PMD添加对Matlab语言的支持,然后开发SonarQube“Matlab PMD”插件。 这没有意义,除非你真的想因为某些原因与PMD集成。 在PMD http ... -
答案是不。 为了您的信息,您不再需要使用PMD。 见http://www.sonarqube.org/already-158-checkstyle-and-pmd-rules-deprecated-by-sonarqube-java-rules/ 。 您也可以关注并投票支持http://jira.codehaus.org/browse/SONARJAVA-26 The answer is no. For your information, you shouldn't need to use PMD anym ...
-
您指定的版本与运行声纳分析不兼容。 请升级需要的SonarQube版本(当前版本为5.1.1) Java 1.7-1.8 SonarQube 5.0或5.1.1 Sonar-runner 2.4 The versions you specified are not compatible for running sonar analysis. Please upgrade SonarQube version (current is 5.1.1) which requires Java 1.7-1.8 Sona ...
-
对不起,没有SonarQube插件可以使用比Clirr更少的工具。 Sorry, there's no SonarQube plugin for a tool that's less dated than Clirr.
-
没有替代品,也不支持。 Gendarme是一个不活跃的项目已有一段时间了,我真的怀疑它的开发将会恢复:事实上,像FxCop一样,它会根据程序集进行分析,而不是直接在源代码上进行分析。 现在,使用Visual Studio 2015,Roslyn分析器将在您键入时实时执行。 这提高了人们对代码分析器的期望,并且应该使用Roslyn重写FxCop分析器和Gendarme分析器,以改善最终用户的体验。 现在,如果你真的想,你仍然可以开发一个SonarQube插件来整合Gendarme结果,但我认为这不是一个好主意 ...
-
你是否像文件中提到的那样传递sonar.scm.provider=perforce 。 我也鼓励你使用Perforce插件的新鲜发布的版本1.3。 Do you pass sonar.scm.provider=perforce like mentioned in documentation. I also encourage you to use freshly released version 1.3 of the Perforce plugin.
-
存储库是插件提供的规则组。 例如,Findbugs插件定义了一个存储库,其关键是“findbugs”,显示名称是“Findbugs”。 您可以在此处找到有关XML格式的更多信息: http : //javadocs.sonarsource.org/6.3/apidocs/org/sonar/api/server/rule/RulesDefinitionXmlLoader.html The repository is the group of rules provided by the plugin. For ...