Crazy lens

解决 : npm WARN registry Unexpected warning...
npm 安装 jsoneditor[root@a2432cd6e437 www]# npm install jso...
扫描右侧二维码阅读全文
19
2020/02

解决 : npm WARN registry Unexpected warning...

npm 安装 jsoneditor

[root@a2432cd6e437 www]# npm install jsoneditor
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ECONNREFUSED: request to https://registry.npmjs.org/jsoneditor failed, reason: connect ECONNREFUSED 104.16.27.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN saveError ENOENT: no such file or directory, open '/var/www/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/var/www/package.json'
npm WARN www No description
npm WARN www No repository field.
npm WARN www No README data
npm WARN www No license field.

+ jsoneditor@8.5.3
updated 1 package in 460.026s


   ╭────────────────────────────────────────────────────────────────╮
   │                                                                │
   │      New patch version of npm available! 6.13.1 -> 6.13.7      │
   │   Changelog: https://github.com/npm/cli/releases/tag/v6.13.7   │
   │               Run npm install -g npm to update!                │
   │                                                                │
   ╰────────────────────────────

百度找到的解决方法

 rm ./package-lock.json
 rm -rf ./node_modules
 npm cache clear --force

执行后 重新 安装

[root@a2432cd6e437 www]# npm install jsoneditor
npm WARN saveError ENOENT: no such file or directory, open '/var/www/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/www/package.json'
npm WARN www No description
npm WARN www No repository field.
npm WARN www No README data
npm WARN www No license field.

+ jsoneditor@8.6.1
added 15 packages from 11 contributors and audited 15 packages in 23.192s
found 0 vulnerabilities
最后修改:2020 年 02 月 19 日 12 : 07 AM
如果觉得我的文章对你有用,请随意赞赏

发表评论