简体   繁体   English

如何修复 nodejs 抛出错误; ^ 错误:ENOENT:没有这样的文件或目录,打开

[英]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.

相关问题 错误:ENOENT:没有这样的文件或目录 Nodejs - Error: ENOENT: no such file or directory Nodejs 如何修复“错误:ENOENT:没有这样的文件或目录 - jenkins 中的 cypress 插件” - How to fix "Error: ENOENT: no such file or directory - cypress plugins in jenkins" ENOENT:没有这样的文件或目录Nodejs - ENOENT: no such file or directory Nodejs npm 错误! 使用 React 时编码 ENOENT,npm ERR! enoent ENOENT: 没有那个文件或目录,打开&#39;D:\\D\\web\\react\\practise - npm ERR! code ENOENT while using React,npm ERR! enoent ENOENT: no such file or directory, open 'D:\D\web\react\practise 如何解决writeFile()的[错误:ENOENT:没有这样的文件或目录,打开] - How to solve [Error: ENOENT: no such file or directory, open ] for writeFile() 详细堆栈错误:ENOENT:没有这样的文件或目录,打开 - verbose stack Error: ENOENT: no such file or directory, open Heroku错误:ENOENT:没有此类文件或目录,请打开“ .env” - Heroku Error: ENOENT: no such file or directory, open '.env' 错误:否:没有此类文件或目录,请打开“ ./views/s.ejs”Nodejs Express - Error: ENOENT: no such file or directory, open './views/s.ejs' Nodejs Express 错误:ENOENT:没有这样的文件或目录,打开尝试使用 fs 访问目录时 - Error: ENOENT: no such file or directory, open When trying to access a directory with fs 错误:ENOENT:没有这样的文件或目录 - Error: ENOENT: no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM