推荐 最新
Mia好纠结

多个npm项目如何避免node_modules重复安装库以节省磁盘?

多个npm项目如何节约node_modules容量? 比如,有很多测试用的npm项目,它们有很多共用的库,比如:antd。 是否有方法技术是可以让已经有的库不再在其他项目重复安装呢?

0
1
0
浏览量263
HAO起起

yarn安装依赖报错Error: ENOENT: no such file or directory?

执行安装命令 "yarn" 报错以下信息 [1/5] 🔍 Validating package.json... warning knight-operation: "dependencies" has dependency "@testing-library/jest-dom" with range "^4.2.4" that collides with a dependency in "devDependencies" of the same name with version "^5.11.6" warning knight-operation: "dependencies" has dependency "@testing-library/react" with range "^9.3.2" that collides with a dependency in "devDependencies" of the same name with version "^11.2.2" [2/5] 🔍 Resolving packages... warning Resolution field "css-loader@3.4.2" is incompatible with requested version "css-loader@4.3.0" [3/5] 🚚 Fetching packages... error http://registry.m.jd.com/fsevents/download/fsevents-1.2.7.tgz: Integrity check failed for "fsevents" (computed integrity doesn't match our records, got "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== sha1-Z79X9HWPAu3oj7KhcS/vTRU1i+M=") [4/5] 🔗 Linking dependencies... warning " > css-loader@3.4.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". warning " > @dada/custom@0.2.10" has incorrect peer dependency "lodash@^4.17.15". warning "webpack-config-single-spa-react > webpack-config-single-spa > standalone-single-spa-webpack-plugin@1.2.1" has unmet peer dependency "webpack@*". error Error: ENOENT: no such file or directory, open '/Users/wangling86/Library/Caches/Yarn/v6/npm-fsevents-1.2.11-4851b664a3783e52003b3c66eb0eee1074933aa4-integrity/node_modules/fsevents/.yarn-metadata.json' info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 请问如何解决呀,试了网上找到的很多方法都无效,如下,求助 yarn cache clean yarn install --network-timeout 10000000 yarn install --network-concurrency 1 rm -rf node_modules **/node_modules rm -rf yarn.lock **/yarn.lock yarn config set "strict-ssl" false -g

0
1
0
浏览量236
无敌铃铃后

如何合理的更新vue2项目过期依赖?

安装依赖的时候,提示警告,有 38 个依赖过期了。 pnpm add axios@latest  WARN  deprecated babel-eslint@7.2.3: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.  WARN  deprecated @babel/polyfill@7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.  WARN  deprecated vue@2.6.10: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.  WARN  38 deprecated subdependencies found: @babel/plugin-proposal-async-generator-functions@7.20.7, @babel/plugin-proposal-class-properties@7.18.6, @babel/plugin-proposal-json-strings@7.18.6, @babel/plugin-proposal-object-rest-spread@7.20.7, @babel/plugin-proposal-optional-catch-binding@7.18.6, @babel/plugin-proposal-unicode-property-regex@7.18.6, @hapi/address@2.1.4, @hapi/bourne@1.3.2, @hapi/hoek@8.5.1, @hapi/joi@15.1.1, @hapi/topo@3.1.6, acorn-dynamic-import@2.0.2, autoprefixer-loader@3.2.0, babel-eslint@10.1.0, browserslist@1.7.7, chokidar@2.1.8, circular-json@0.3.3, consolidate@0.14.5, consolidate@0.15.1, core-js@2.6.12, eslint-loader@2.2.1, extract-text-webpack-plugin@3.0.2, figgy-pudding@3.5.2, flatten@1.0.3, fsevents@1.2.13, har-validator@5.1.5, html-webpack-plugin@3.2.0, request-promise-native@1.0.9, request@2.88.2, resolve-url@0.2.1, source-map-resolve@0.5.3, source-map-url@0.4.1, stable@0.1.8, svgo@0.7.2, svgo@1.3.2, urix@0.1.0, uuid@3.4.0, webpack-chain@4.12.1  WARN  Issues with peer dependencies found 这些依赖不确定新版本是否兼容当前项目,有些 babel 的插件废弃了,有些查看很久没有更新。有没有好的办法解决依赖过期的问题呢。

0
1
0
浏览量138
颜如玉你信不信

为什么修改node_modules里面的包后,没有效果呢?

以下操作均尝试并且无效: 1. 确认是修改的是入口文件 2. 确认修改的和引入的是同一个文件 3. 重启了项目 4. 修改一下其它文件,触发脚手架重新编译

0
1
0
浏览量131
一颗西兰花

yarn在容器下载依赖失败?

又一个yarn的问题 ̄□ ̄|| 在容器执行命令安装依赖 "yarn" "image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240929/a222c30bfa9d02c67af3f1b0238ea0c0.png) 试了以下很多方法也还是不行,求助 yarn cache clean yarn install --network-timeout 10000000 yarn install --network-concurrency 1 rm -rf node_modules **/node_modules rm -rf yarn.lock **/yarn.lock yarn config set "strict-ssl" false -g

0
1
0
浏览量132
我爱了你呢

如何理解 pnpm 的 node 模块解析算法及其软链处理?

看 pnpm 官网文档的时候有一个疑惑 "https://pnpm.io/zh/symlinked-node-modules-structure" (https://link.segmentfault.com/?enc=vVYv4hlkKLqMpJarCssXLA%3D%3D.2b40iL%2BFDZvNsXRvOCU%2FMVrtesopbY%2FQ%2Bl6RCXvavVenlueA7psXgrHe7g4yc70R5Vjhs8YEh%2BcuJcImEth2Sg%3D%3D) pnpm 这里的 node module resolve 算法怎么理解呢。在 foo 中 require bar,如果说因为 .pnpm/foo@1.0.0/node_modules/bar 是软链所以被忽略的话,根据 node 模块查找算法,不应该开始查找 .pnpm/node_modules 目录(实际不存在)么?如果说 node 发现是软链,会定位到模块的原始文件,resolve 到 .pnpm/bar@1.0.0/node_modules/bar 倒是可以说通了,求问这里该如何理解呢。 "image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240919/f8a57b6e4700ec8bebafa88c7e2d523a.png) "https://meixg.cn/2021/01/25/ln-nodejs/" (https://link.segmentfault.com/?enc=ZYzn2qkMg7c0uL4syF%2Byhw%3D%3D.bfr3Xn%2FocZQKRKzO3jSzxQOWLRvIHr8I1I1Zo6BCKliLJfbIEY11jST%2B4w5OmMoW) "https://github.com/nodejs/node/issues/3402" (https://link.segmentfault.com/?enc=8Ig%2FmAka10WVTz80hFbfAA%3D%3D.Oao6uIbPebyTldmiGz1MJcZl68SNGbhT%2BnFv6X7L0oo3P7dFusJQz1yjO9fvBBdD)

0
1
0
浏览量124