logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
32.11k stars 1.87k forks source link

Marketplace Plgin Installation with RAMDISK on Windows #4579

Open cxumol opened 2 years ago

cxumol commented 2 years ago

What happened?

Unable to install anything (plgins/themes) from marketplace. It must be caused by my temp folder setup, which is located in the RAMDISK.

Error messages are like

[Install Error]:EISDIR: illegal operation on a directory, realpath 'R:\Temp\logseq-journals-calendar-0.10.1'

[Install Error]:EISDIR: illegal operation on a directory, realpath 'R:\Temp\logseq-bonofix-theme-v3.6.2'

Reproduce the Bug

  1. Setup RAMDISK by ImDisk
  2. Change the "TEMP" environment variable of system/user to a RAMDISK path
  3. Try installing anything from plugin marketplace

Expected Behavior

No response

Screenshots

bug-1

bug-2

Desktop Platform Information

APP v0.6.3 on Windows 10

Mobile Platform Information

No response

Additional Context

It seems similar to this upstream bug https://github.com/nodejs/node/issues/6861

The possible solution might be this one https://github.com/facebook/jest/pull/6906 Thanks

cxumol commented 2 years ago

@andelf Sorry for incorrectly indicating it being an "upstream" bug. The upstream (nodejs) issue I mentioned was closed in 2016, which means to me that they have resolved it on their side and thus won't make any further change since 2016.

As of this bug, I do believe it can be fixed on the Logseq side, because there has been a solution made from another project when they encounter the same/similar problem. The same/similar issue on facebook/jest https://github.com/facebook/jest/issues/6880 And how they resolved it https://github.com/facebook/jest/pull/6906/files

andelf commented 2 years ago

@cxumol Many thanks for providing the details. A minor patch to fs utility should fix this.

TenviLi commented 1 year ago

+1

Ziron commented 1 year ago

This is a problem in other electron apps also, such as Arduino IDE 2. I use a small batch script as a temporary workaround for starting Logseq with a custom TEMP dir on a normal drive, which is only needed when installing new plugins.

@ECHO OFF

Pushd %LOCALAPPDATA%\Logseq\app-0.9.4
set TEMP=C:\tmp&& %LOCALAPPDATA%\Logseq\Logseq.exe