Closed SlenderData closed 4 months ago
v2.4.0-beta.8
Windows
Nodejs 版本 v20.15.1,使用包管理器 fnm 安装。
终端的默认配置文件 Microsoft.PowerShell_profile.ps1 里按照 fnm 的指导添加了如下代码。如果不添加,Windows 终端同样也检测不到已安装的 Nodejs。
Microsoft.PowerShell_profile.ps1
fnm env --use-on-cd | Out-String | Invoke-Expression
2024-07-18 08:59:40 [PicGo INFO] [PicGo Server] is listening at 36677 2024-07-18 08:59:40 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] 2024-07-18 08:59:40 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] successfully 2024-07-19 08:40:35 [PicGo INFO] [PicGo Server] is listening at 36677 2024-07-19 08:40:35 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] 2024-07-19 08:40:35 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] successfully 2024-07-19 08:41:43 [PicGo ERROR] ------Error Stack Begin------ Error: spawn npm ENOENT at notFoundError (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:6:26) at verifyENOENT (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:40:16) at ChildProcess.cp.emit (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:27:25) at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) -------Error Stack End------- 2024-07-19 08:41:43 [PicGo ERROR] NPM is not installed 2024-07-19 08:41:43 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 'npm' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���
这个 npm 和 node.js 需要你的环境变量的 PATH 里有对应的路径,否则 picgo 将无法找到。具体可以谷歌。
前置阅读 | Pre-reading
PicGo的版本 | PicGo Version
v2.4.0-beta.8
系统信息 | System Information
Windows
问题重现 | Bug reproduce
Nodejs 版本 v20.15.1,使用包管理器 fnm 安装。
终端的默认配置文件
Microsoft.PowerShell_profile.ps1
里按照 fnm 的指导添加了如下代码。如果不添加,Windows 终端同样也检测不到已安装的 Nodejs。相关日志 | Logs
2024-07-18 08:59:40 [PicGo INFO] [PicGo Server] is listening at 36677 2024-07-18 08:59:40 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] 2024-07-18 08:59:40 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] successfully 2024-07-19 08:40:35 [PicGo INFO] [PicGo Server] is listening at 36677 2024-07-19 08:40:35 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] 2024-07-19 08:40:35 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] successfully 2024-07-19 08:41:43 [PicGo ERROR] ------Error Stack Begin------ Error: spawn npm ENOENT at notFoundError (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:6:26) at verifyENOENT (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:40:16) at ChildProcess.cp.emit (C:\Program Files\PicGo\resources\app.asar\node_modules\picgo\node_modules\cross-spawn\lib\enoent.js:27:25) at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) -------Error Stack End------- 2024-07-19 08:41:43 [PicGo ERROR] NPM is not installed 2024-07-19 08:41:43 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 'npm' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���