我的问题是关于如何在我的npm企业中启用npm audit命令 注册表
当我尝试运行npm audit命令时,出现以下错误
JFXTreeTableColumn<User, String> settingsColumn = new JFXTreeTableColumn<>("Others");
settingsColumn.setPrefWidth(100);
Callback<TreeTableColumn<User, String>, TreeTableCell<User, String>> cellFactory
= //
new Callback<TreeTableColumn<User, String>, TreeTableCell<User, String>>() {
@Override
public TreeTableCell call(final TreeTableColumn<User, String> param) {
final TreeTableCell<User, String> cell = new TreeTableCell<User, String>() {
final JFXButton btn = new JFXButton("Just Do it");
@Override
public void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (empty) {
setGraphic(null);
setText(null);
} else {
btn.setButtonType(JFXButton.ButtonType.RAISED);
btn.setOnAction(event -> {
//Button Action here
});
setGraphic(btn);
setText(null);
}
}
};
return cell;
}
};
settingsColumn.setCellFactory(cellFactory);
//Also remember to add the new column in
treeView.getColumns().setAll(deptColumn, ageColumn, empColumn, settingsColumn);
这是我的研究
我尝试了以下命令及其作用
{
"error": {
"code": "ENOAUDIT",
"summary": "Your configured registry (https://registry.npmjs.mydomain/) does not support audit requests.",
"detail": ""
}
}
但是当我使用
npm audit --json --registry https://registry.npmjs.org/
它不起作用。 如何配置使我的注册表与npm audit命令一起使用
答案 0 :(得分:7)
我有同样的问题。我们正在为私有npm注册表doesn't support npm audit yet使用人工制品。最适合我的解决方案是:
npm audit --registry=https://registry.npmjs.org
替代解决方案:
npm set registry https://registry.npmjs.org
npm audit
/ npm audit fix
答案 1 :(得分:0)
Jfrog Artifactory现在完全支持“ npm audit”命令(从6.10版本开始)
此外,将Jfrog Xray与Artifactory结合使用还将通过来自Xray数据库的更多漏洞和安全信息来丰富审计报告。
https://www.jfrog.com/confluence/display/RTF/Release+Notes#ReleaseNotes-Artifactory6.10