当前位置 : 首页 > 攻略秘籍 > 单职业手游 > 正文

解决办法:npm ERR! code ENOLOCK

编辑:迷失传奇版本浏览:462时间:2023-01-28 03:43:55

具体错误

$sudonpmauditfix--forcenpmWARNusing--forceRecommendedprotectionsdisabled.npmERR!codeENOLOCKnpmERR!auditThiscommandrequiresanexistinglockfile.npmERR!auditTrycreatingonefirstwith:npmi--package-lock-onlynpmERR!auditOriginalerror:loadVirtualrequiresexistingshrinkwrapfilenpmERR!Acompletelogofthisruncanbefoundin:npmERR!/home/tsit/.npm/_logs/2022-12-13T07_12_26_971Z-debug-0.log

初始化

$sudonpminit--yesWroteto/home/tsit/package.json:{"name":"tsit","version":"1.0.0","description":"","main":"index.js","directories":{"test":"test"},"scripts":{"test":"echo\"Error:notestspecified\"&&exit1"},"keywords":[],"author":"","license":"ISC"}

创建package-lock-only

$sudonpmi--package-lock-onlyuptodate,audited1packagein114msfound0vulnerabilities

自动修复

$sudonpmauditfix--forcenpmWARNusing--forceRecommendedprotectionsdisabled.uptodate,audited1packagein98msfound0vulnerabilities

验证

执行相应命令。比如我安装的是syberh:

$syberh-version2.2.4



转载请注明出处:迷失传奇版本 ,如有疑问,请联系(如有侵权内容联系本站管理员 )。

本文地址: https://www.mishipk.com/news/73650.html

相关内容更多
    游戏视频更多
        最新游戏推荐更多