Nodejs读取文件ENAMETOOLONG

Nodejs reading file ENAMETOOLONG

我正在尝试使用 const config = fs.readFileSync(configFilePath,'utf8');

但它实际上返回了一个错误,如下所述:

fs.js:663
  return binding.open(pathModule.toNamespacedPath(path),
                 ^

Error: ENAMETOOLONG: name too long, open '/Users/akshaysood/Blockchain/fabricSDK/dist/name: "Network"
version: "1.0"

我正在尝试读取的文件位于 https://hastebin.com/ubaqakixit.http

我是 node.js 的新手。如果有人知道这个错误请告诉我

节点sdk接受Yaml文件路径作为输入,而不是接受Yaml文件内容。所以应该是

const path = require('path');
const config= path.resolve(configFilePath);

继续