Molunerfinn / PicGo

:rocket:A simple & beautiful tool for pictures uploading built by vue-cli-electron-builder
https://molunerfinn.com/PicGo/
MIT License
24.21k stars 2.24k forks source link

[Bug]: 安装插件报错: string-width-cjs@npm:string-width-cjs@4.2.3 No matching version found for string-width-cjs@4.2.3. #1219

Closed xinatcg closed 9 months ago

xinatcg commented 9 months ago

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

2.4.0-beta.5

系统信息 | System Information

Mac(arm64)

问题重现 | Bug reproduce

search gdrive and install plugin


2024-02-27 22:13:25 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 
 npm ERR! code ETARGET
npm ERR! notarget No matching version found for string-width-cjs@4.2.3.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mengxin/.npm/_logs/2024-02-27T14_13_25_063Z-debug.log
 
2024-02-27 22:13:54 [PicGo INFO] [PicGo Server] is listening at 36677 
2024-02-27 22:13:54 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [Ctrl+Alt+Cmd+P] 
2024-02-27 22:13:54 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [Ctrl+Alt+Cmd+P] successfully 
2024-02-27 22:14:07 [PicGo SUCCESS] 插件更新成功 
2024-02-27 22:14:12 [PicGo INFO] [PicGo Server] is listening at 36677 
2024-02-27 22:14:12 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [Ctrl+Alt+Cmd+P] 
2024-02-27 22:14:12 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [Ctrl+Alt+Cmd+P] successfully 
2024-02-27 22:14:38 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 
 npm ERR! code ETARGET
npm ERR! notarget No matching version found for string-width-cjs@4.2.3.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mengxin/.npm/_logs/2024-02-27T14_14_38_972Z-debug.log
 
2024-02-27 22:15:31 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 
 npm ERR! code ETARGET
npm ERR! notarget No matching version found for string-width-cjs@4.2.3.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mengxin/.npm/_logs/2024-02-27T14_15_31_407Z-debug.log

相关日志 | Logs

6 silly install readLocalPackageData 7 http fetch GET 200 https://registry.npmjs.org/picgo-plugin-gdrive-clone 611ms 8 http fetch GET 200 https://registry.npmjs.org/picgo-plugin-gdrive-clone/-/picgo-plugin-gdrive-clone-1.0.0.tgz 634ms 9 silly pacote tag manifest for picgo-plugin-gdrive-clone@latest fetched in 1267ms 10 timing stage:loadCurrentTree Completed in 2838ms 11 silly install loadIdealTree 12 silly install cloneCurrentTreeToIdealTree 13 timing stage:loadIdealTree:cloneCurrentTree Completed in 15ms 14 silly install loadShrinkwrap 15 http fetch GET 200 https://registry.npmjs.org/string-width-cjs 499ms 16 silly fetchPackageMetaData error for string-width-cjs@npm:string-width-cjs@4.2.3 No matching version found for string-width-cjs@4.2.3. 17 timing stage:rollbackFailedOptional Completed in 1ms 18 timing stage:runTopLevelLifecycles Completed in 3855ms 19 silly saveTree picgo-plugins@ 19 silly saveTree +-- picgo-plugin-clipboard@1.0.0 19 silly saveTree -- picgo-plugin-gdrive@1.1.1 19 silly saveTree +-- googleapis@105.0.0 19 silly saveTree | +-- google-auth-library@8.9.0 19 silly saveTree | | +-- arrify@2.0.1 19 silly saveTree | | +-- base64-js@1.5.1 19 silly saveTree | | +-- ecdsa-sig-formatter@1.0.11 19 silly saveTree | | +-- fast-text-encoding@1.0.6 19 silly saveTree | | +-- gaxios@5.1.3 19 silly saveTree | | | +-- extend@3.0.2 19 silly saveTree | | | +-- https-proxy-agent@5.0.1 19 silly saveTree | | | | +-- agent-base@6.0.2 19 silly saveTree | | | | |-- debug@4.3.4 19 silly saveTree | | | | | -- ms@2.1.2 19 silly saveTree | | | |-- debug@4.3.4 19 silly saveTree | | | +-- is-stream@2.0.1 19 silly saveTree | | | -- node-fetch@2.7.0 19 silly saveTree | | +-- gcp-metadata@5.3.0 19 silly saveTree | | |-- json-bigint@1.0.0 19 silly saveTree | | | -- bignumber.js@9.1.2 19 silly saveTree | | +-- gtoken@6.1.2 19 silly saveTree | | | +-- google-p12-pem@4.0.1 19 silly saveTree | | | |-- node-forge@1.3.1 19 silly saveTree | | | -- jws@4.0.0 19 silly saveTree | | |-- jwa@2.0.0 19 silly saveTree | | | -- buffer-equal-constant-time@1.0.1 19 silly saveTree | | +-- jws@4.0.0 19 silly saveTree | |-- lru-cache@6.0.0 19 silly saveTree | -- googleapis-common@6.0.4 19 silly saveTree-- node-clipboardy@1.0.3 19 silly saveTree +-- arch@2.2.0 19 silly saveTree +-- execa@5.1.1 19 silly saveTree | +-- cross-spawn@7.0.3 19 silly saveTree | +-- get-stream@6.0.1 19 silly saveTree | +-- human-signals@2.1.0 19 silly saveTree | +-- is-stream@2.0.1 19 silly saveTree | -- merge-stream@2.0.0 19 silly saveTree-- is-wsl@2.2.0 19 silly saveTree `-- is-docker@2.2.1 20 verbose type version 21 verbose stack string-width-cjs: No matching version found for string-width-cjs@4.2.3. 21 verbose stack at pickManifest (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:122:13) 21 verbose stack at /Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:14 21 verbose stack at tryCatcher (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23) 21 verbose stack at Promise._settlePromiseFromHandler (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31) 21 verbose stack at Promise._settlePromise (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18) 21 verbose stack at Promise._settlePromise0 (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:619:10) 21 verbose stack at Promise._settlePromises (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:699:18) 21 verbose stack at _drainQueueStep (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12) 21 verbose stack at _drainQueue (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9) 21 verbose stack at Async._drainQueues (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5) 21 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (/Users/mengxin/.nvm/versions/node/v14.17.6/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14) 21 verbose stack at processImmediate (internal/timers.js:464:21) 22 verbose cwd /Users/mengxin/Library/Application Support/picgo 23 verbose Darwin 23.3.0 24 verbose argv "/Users/mengxin/.nvm/versions/node/v14.17.6/bin/node" "/Users/mengxin/.nvm/versions/node/v14.17.6/bin/npm" "install" "picgo-plugin-gdrive-clone" "--color=always" "--save" 25 verbose node v14.17.6 26 verbose npm v6.14.15

xinatcg commented 9 months ago

https://github.com/xinatcg/picgo-plugin-gdrive

这个 dependency 在插件的依赖好像没有, 我尝试将这个依赖直接指定为 npm 最新版本, 但是没用. 很奇怪, 之前没有问题, 好像最近才出的这个错误.

Molunerfinn commented 9 months ago

这个是因为你某个依赖项里依赖了这个包导致的。我看了下 string-width-cjs 确实没有这个版本的包。可能作者 drop 了此前版本的包。

https://www.npmjs.com/package/string-width-cjs?activeTab=versions

升级你自己插件的 deps 再试试吧,这个不是 picgo 的问题。