[英]How to fix nodejs throw err; ^ Error: ENOENT: no such file or directory, open
This is how my output looks like.这就是我的 output 的样子。 I have exhausted so many methods from previous similar questions but none of them worked in my case.
我已经从以前的类似问题中用尽了很多方法,但没有一个对我有用。 I am really new with node js so any suggestion would be really helpful -
我对node js真的很陌生,所以任何建议都会很有帮助-
C:\Users\pushp\Desktop\factor>snarkjs --help
internal/fs/utils.js:230
throw err;
^
Error: ENOENT: no such file or directory, open '\C:\Users\pushp\AppData\Roaming\npm\node_modules\snarkjs\package.json'
[90m at Object.openSync (fs.js:458:3)[39m
[90m at Object.readFileSync (fs.js:360:35)[39m
at Object.<anonymous> (C:\Users\pushp\AppData\Roaming\npm\node_modules\[4msnarkjs[24m\build\cli.cjs:1228:15)
[90m at Module._compile (internal/modules/cjs/loader.js:1138:30)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:986:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:879:14)[39m
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m
[90m at internal/main/run_main_module.js:17:47[39m {
errno: [33m-4058[39m,
syscall: [32m'open'[39m,
code: [32m'ENOENT'[39m,
path: [32m'\\C:\\Users\\pushp\\AppData\\Roaming\\npm\\node_modules\\snarkjs\\package.json'[39m
}
Looks like this is a known bug in the module .看起来这是模块中的一个已知错误。 You could try patching their code as recommended in the issue, or (what I personally would recommend), get WSL set up so you don't have to fight with as many inconsistencies on Windows.
您可以尝试按照问题中的建议修补他们的代码,或者(我个人建议)设置 WSL,这样您就不必与 Windows 上的许多不一致问题作斗争。 Or you could submit a pull request to that module to fix the issue.
或者您可以向该模块提交拉取请求以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.