Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在Arkit中配置JSON以在Package.JSON中可视化NPM模块_Node.js_Json_Npm_Architecture - Fatal编程技术网

Node.js 在Arkit中配置JSON以在Package.JSON中可视化NPM模块

Node.js 在Arkit中配置JSON以在Package.JSON中可视化NPM模块,node.js,json,npm,architecture,Node.js,Json,Npm,Architecture,我使用以下名为的npm包来创建node.js项目的体系结构图,但我无法在我的node.js应用程序体系结构中可视化npm包(依赖项文件夹),如Arkit和Vue/Nuxt TodoMVC示例所示,我试图遵循各自Arkit的json配置,但它们要么像Vue中那样不存在,要么像Arkit本身一样模糊。 我使用了arkit配置示例中给出的配置,但最终得到了主依赖项的所有依赖项。我尝试了以下配置 { "$schema": "https://arkit.pro/schema.

我使用以下名为的npm包来创建node.js项目的体系结构图,但我无法在我的node.js应用程序体系结构中可视化npm包(依赖项文件夹),如Arkit和Vue/Nuxt TodoMVC示例所示,我试图遵循各自Arkit的json配置,但它们要么像Vue中那样不存在,要么像Arkit本身一样模糊。 我使用了arkit配置示例中给出的配置,但最终得到了主依赖项的所有依赖项。我尝试了以下配置

{ "$schema": "https://arkit.pro/schema.json", 
"excludePatterns": ["test/**", "tests/**", "**/*.test.*", "**/*.spec.*"], 
"components": [ 
{ "type": "Dependency", 
"patterns": ["node_modules/**/*.js"] }, 
{ "type": "Component", 
"patterns": ["**/*.js", "**/*.jsx"] 
} 
], 
"output": [ 
{ "path": "arkit.svg", 
"groups": [ { "first": true, "components": ["Component"] },
 { 
"type": "Dependencies", 
"components": ["Dependency"] 
} 
] 
} 
] 
}
但它在架构生成过程中崩溃了,我也给这个npm包的所有者和另一个成功做到这一点的人发了电子邮件,但他们正忙着指导我配置arkit的JSON。 我是否可以在JSON配置文件中使用for of循环,以便仅获取package.JSON中包含的那些node_模块,因为我不想在架构表示中获取主npm包的附加子依赖项,如上面共享的链接所示

TL;博士 我想要像这样具有依赖关系的图表,但是我得到了
我尝试过,在命令行“npx arkit--config test.json--depth=0”中添加--depth=0,但运气不好,我认为arkit希望output.path是一个数组,但您传递给它的是一个字符串。尝试使用修改后的配置:

{
    "$schema": "https://arkit.pro/schema.json",
    "excludePatterns": ["test/**", "tests/**", "**/*.test.*", "**/*.spec.*"],
    "components": [{
            "type": "Dependency",
            "patterns": ["node_modules/*"]
        },
        {
            "type": "Component",
            "patterns": ["**/*.js", "**/*.jsx"]
        }
    ],
    "output": [{
        "path": ["arkit.svg"],
        "groups": [{
                "first": true,
                "components": ["Component"]
            },
            {
                "type": "Dependencies",
                "components": ["Dependency"]
            }
        ]
    }]
}

它不起作用,我认为需要在node_modules/“something”中进行一些修改,我也做了一些更改。忘了提了。您是否使用了我按原样输入的配置?是的,我按原样使用了配置,您能指导我修改节点模块部分吗?您能发布您收到的错误吗?这可能有助于更容易地了解发生了什么。您在arkit命令行中使用了任何深度吗?比如“npm列表--深度=0”