将web3作为依赖项会发出反对通知,如
npm WARN deprecated @types/keyv@4.2.0: This is a stub types definition. keyv provides its own type definitions, so you do not need this installed.
npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
这有问题吗?如果是的话,我该怎么解决呢?
发布于 2022-10-26 14:05:24
错误可能是由于.json文件中的依赖关系版本造成的。
我试着用盖茨比建立一个网站。在发布了一两个月的网站后,我尝试使用npm update
并抛出一个非常类似于您的错误。
npm WARN deprecated multer@1.4.4: Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated gatsby-recipes@0.25.0: gatsby-recipes has been removed from gatsby/gatsby-cli >=4.5.0. Update to gatsby@latest/gatsby-cli@latest to use versions without gatsby-recipes. This package will no longer receive updates.
然后,我发现npm有一种非常优秀的方式来显示.json文件中提到的使用npm outdated
的依赖版本。就像这样:
$ npm outdated
Package Current Wanted Latest Location Depended by
babel-plugin-styled-components 1.13.3 1.13.3 2.0.7 node_modules/babel-plugin-styled-components portfolio-main
babel-preset-gatsby 1.14.0 1.14.0 2.24.0 node_modules/babel-preset-gatsby portfolio-main
eslint 7.32.0 7.32.0 8.26.0 node_modules/eslint portfolio-main
gatsby 3.14.6 3.14.6 4.24.5 node_modules/gatsby portfolio-main
gatsby-plugin-google-analytics 3.14.0 3.14.0 4.24.0 node_modules/gatsby-plugin-google-analytics portfolio-main
gatsby-plugin-image 1.14.2 1.14.2 2.24.0 node_modules/gatsby-plugin-image portfolio-main
gatsby-plugin-manifest 3.14.0 3.14.0 4.24.0 node_modules/gatsby-plugin-manifest portfolio-main
gatsby-plugin-netlify 3.14.0 3.14.0 5.0.1 node_modules/gatsby-plugin-netlify portfolio-main
gatsby-plugin-offline 4.14.0 4.14.0 5.24.0 node_modules/gatsby-plugin-offline portfolio-main
gatsby-plugin-react-helmet 4.14.0 4.14.0 5.24.0 node_modules/gatsby-plugin-react-helmet portfolio-main
gatsby-plugin-sharp 3.14.3 3.14.3 4.24.0 node_modules/gatsby-plugin-sharp portfolio-main
gatsby-plugin-sitemap 4.10.0 4.10.0 5.24.0 node_modules/gatsby-plugin-sitemap portfolio-main
gatsby-plugin-styled-components 4.14.0 4.14.0 5.24.0 node_modules/gatsby-plugin-styled-components portfolio-main
gatsby-remark-images 5.11.0 5.11.0 6.24.0 node_modules/gatsby-remark-images portfolio-main
gatsby-remark-prismjs 5.11.0 5.11.0 6.24.0 node_modules/gatsby-remark-prismjs portfolio-main
gatsby-source-filesystem 3.14.0 3.14.0 4.24.0 node_modules/gatsby-source-filesystem portfolio-main
gatsby-transformer-remark 4.11.0 4.11.0 5.24.0 node_modules/gatsby-transformer-remark portfolio-main
gatsby-transformer-sharp 3.14.0 3.14.0 4.24.0 node_modules/gatsby-transformer-sharp portfolio-main
husky 6.0.0 6.0.0 8.0.1 node_modules/husky portfolio-main
lint-staged 10.5.4 10.5.4 13.0.3 node_modules/lint-staged portfolio-main
react 17.0.2 17.0.2 18.2.0 node_modules/react portfolio-main
react-dom 17.0.2 17.0.2 18.2.0 node_modules/react-dom portfolio-main
在我尝试使用^
之前,我一个一个地编辑了所有的依赖关系到想要的版本。然后,npm update
在没有任何错误的情况下做到了这一点。我的gatsby build
很有魅力。
我建议不要担心您所拥有的代码,如果问题类似于我的问题,那么它只是一直以来的依赖关系更新,如果您想要自动更新,我们需要在版本上留个注释,或者只使用^
或~
。
您可以在npm
网站上查看这个更多的细节。
https://stackoverflow.com/questions/74121786
复制相似问题