问题概述
关于这个问题,是在本地代码打包运行的时候遇见的,
打包开发完成后,npm install 打包发布,出现 “ node-uuid@1.4.1: Use uuid module instead ”
如下图:
具体信息如下:
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated json3@3.2.6: Please use the native JSON object instead of JSON 3
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm WARN deprecated
npm WARN deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm WARN deprecated node-uuid@1.4.1: Use uuid module instead
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
解决办法
关于这个问题,其实很简单,
node-uuid包已被弃用,取而代之的是现在持续维护的uuid包。如果仍在项目中使用node-uuid,那么现在应该切换到新的uuid包,以避免将来出现任何兼容性问题,并使用uuid的新特性。
第一步:
首先,需要从项目中删除已弃用的node- uid包,
输入指令:
npm uninstall node-uuid
第二步:
接下来,安装新的uuid包,
输入指令:
npm install uuid
第三步:
更新npm缓存,并删除代码中node_modules、package-lock.json的文件,
输入指令:
npm cache clean --force
第四步:
开始打包,
输入指令:
npm run build
即可顺利打包完成了!
如下图:
好了,关于 npm install 失败,node-uuid@1.4.1: Use uuid module instead 的解决办法 就写到这儿了,如果还有什么疑问或遇到什么问题欢迎扫码提问,也可以给我留言哦,我会一一详细的解答的。
歇后语:“ 共同学习,共同进步 ”,也希望大家多多关注CSND的IT社区。
作 者: | 华 仔 |
联系作者: | who.seek.me@java98k.vip |
来 源: | CSDN (Chinese Software Developer Network) |
原 文: | https://blog.csdn.net/Hello_World_QWP/article/details/145878303? |
版权声明: | 本文为博主原创文章,请在转载时务必注明博文出处! |