欢迎来到老马的领地~ 这是“压风式散热底座”发明者的个人网站:) 本人QQ:80524554,用户群1:562279766
先说结论:
RamDisk是Primo Ramdisk Ultimate Edition,其虚拟硬盘的类型要设置为[SCSI 硬盘].
原先为了快,选的是[Direct-IO 硬盘],结果就不行,看来兼容性才是一切!!!
事情的起因是接了一个小案子,打算用ARDUINO做,因为功能非常简单,就一路测温,一个高温开关,五个按键,一个12864屏,没了.
之前装了个2.3.2版,不能运行,没当回事,反正只是尝个鲜,一直也不使用,不能运行就不能运行吧.
结果现在用的芯片是Air001,这货在vscode+platformio中没法开发,只能老实地用arduino那原生的垃圾IDE....
于是乎,打算用2.0版的,发现2.3.2不能运行,简单嘛,升级到最新的2.3.3,结果还是不行...
查了一下日志(位于C:\Users\Administrator\AppData\Roaming\Arduino IDE下),发现如下内容:
2024-11-06 09:22:23 Failed to start the electron application.
2024-11-06 09:22:23 Error: EISDIR: illegal operation on a directory, realpath 'R:\TEMP'
at Function.<anonymous> (node:fs:2719:3)
at Function.native (node:electron/js2c/asar_bundle:2:5101)
at new d (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:2:769052)
at Ee (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:633790)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:637767
at Le (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:637836)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638223
at Fe (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638164)
at Oe (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638198)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:636512 {
errno: -4068,
syscall: 'realpath',
code: 'EISDIR',
path: 'R:\\TEMP'
}
用[EISDIR: illegal operation on a directory, realpath 'XXXXX']一搜,找到如下页面:
https://forum.arduino.cc/
看来是个BUG,且还未解决.
其中的一个回复说道:
Understanding the Error:
The “EISDIR: illegal operation on a directory, realpath” error occurs when using Vite on virtual and RAM disks that bypass the Volume Mounting Manager, such as ImDisk, due to a mismatch between the required disk management mechanism and the actual disk setup. Vite’s dependency on the fs.realpathSync.native method necessitates the involvement of the Mount Manager to locate mount points and perform related operations. However, since ImDisk does not interact with the Mount Manager, these operations result in errors.
The Solution: Implementing a Wrapper Function:
To overcome the “EISDIR” error and enable smooth building with Vite on virtual and RAM disks, a wrapper function can be created to handle the issue effectively. The wrapper function encapsulates the problematic code within a try-catch block, allowing for graceful error handling and resolution.
翻译了一下,是在说:
了解错误:
由于所需的磁盘管理机制与实际磁盘设置不匹配,在绕过卷挂载管理器(例如 ImDisk)的虚拟和 RAM 磁盘上使用 Vite 时,会出现“EISDIR:对目录、realpath 的非法操作”错误。Vite 对 fs.realpathSync.native 方法的依赖需要挂载管理器的参与来定位挂载点并执行相关操作。但是,由于 ImDisk 不与挂载管理器交互,这些操作会导致错误。
解决方案:实现包装函数:
为了克服“EISDIR”错误并能够在虚拟和 RAM 磁盘上使用 Vite 顺利构建,可以创建一个包装函数来有效处理该问题。包装函数将有问题的代码封装在 try-catch 块中,从而可以优雅地处理和解决错误。
好嘛,明白了,不是标准手段获取卷的,那对于一些未按标准手段生成卷的情况,当然就对不上了,好比对向骑自行车时,要撞了,对面猛喊:[你往左我往右!!]啪,完美地形成了BUG!
解决方法也很简单,就是前面提到的,把RamDisk的选项改一下:
可以看到我的设置原本是Direct-IO硬盘,改为SCSI硬盘再保存重启,一切就正常了.
以上.
RamDisk是Primo Ramdisk Ultimate Edition,其虚拟硬盘的类型要设置为[SCSI 硬盘].
原先为了快,选的是[Direct-IO 硬盘],结果就不行,看来兼容性才是一切!!!

事情的起因是接了一个小案子,打算用ARDUINO做,因为功能非常简单,就一路测温,一个高温开关,五个按键,一个12864屏,没了.
之前装了个2.3.2版,不能运行,没当回事,反正只是尝个鲜,一直也不使用,不能运行就不能运行吧.
结果现在用的芯片是Air001,这货在vscode+platformio中没法开发,只能老实地用arduino那原生的垃圾IDE....

于是乎,打算用2.0版的,发现2.3.2不能运行,简单嘛,升级到最新的2.3.3,结果还是不行...
查了一下日志(位于C:\Users\Administrator\AppData\Roaming\Arduino IDE下),发现如下内容:
2024-11-06 09:22:23 Failed to start the electron application.
2024-11-06 09:22:23 Error: EISDIR: illegal operation on a directory, realpath 'R:\TEMP'
at Function.<anonymous> (node:fs:2719:3)
at Function.native (node:electron/js2c/asar_bundle:2:5101)
at new d (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:2:769052)
at Ee (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:633790)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:637767
at Le (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:637836)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638223
at Fe (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638164)
at Oe (C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:638198)
at C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js:8:636512 {
errno: -4068,
syscall: 'realpath',
code: 'EISDIR',
path: 'R:\\TEMP'
}
用[EISDIR: illegal operation on a directory, realpath 'XXXXX']一搜,找到如下页面:
https://forum.arduino.cc/
看来是个BUG,且还未解决.
其中的一个回复说道:
Understanding the Error:
The “EISDIR: illegal operation on a directory, realpath” error occurs when using Vite on virtual and RAM disks that bypass the Volume Mounting Manager, such as ImDisk, due to a mismatch between the required disk management mechanism and the actual disk setup. Vite’s dependency on the fs.realpathSync.native method necessitates the involvement of the Mount Manager to locate mount points and perform related operations. However, since ImDisk does not interact with the Mount Manager, these operations result in errors.
The Solution: Implementing a Wrapper Function:
To overcome the “EISDIR” error and enable smooth building with Vite on virtual and RAM disks, a wrapper function can be created to handle the issue effectively. The wrapper function encapsulates the problematic code within a try-catch block, allowing for graceful error handling and resolution.
翻译了一下,是在说:
了解错误:
由于所需的磁盘管理机制与实际磁盘设置不匹配,在绕过卷挂载管理器(例如 ImDisk)的虚拟和 RAM 磁盘上使用 Vite 时,会出现“EISDIR:对目录、realpath 的非法操作”错误。Vite 对 fs.realpathSync.native 方法的依赖需要挂载管理器的参与来定位挂载点并执行相关操作。但是,由于 ImDisk 不与挂载管理器交互,这些操作会导致错误。
解决方案:实现包装函数:
为了克服“EISDIR”错误并能够在虚拟和 RAM 磁盘上使用 Vite 顺利构建,可以创建一个包装函数来有效处理该问题。包装函数将有问题的代码封装在 try-catch 块中,从而可以优雅地处理和解决错误。
好嘛,明白了,不是标准手段获取卷的,那对于一些未按标准手段生成卷的情况,当然就对不上了,好比对向骑自行车时,要撞了,对面猛喊:[你往左我往右!!]啪,完美地形成了BUG!

解决方法也很简单,就是前面提到的,把RamDisk的选项改一下:
可以看到我的设置原本是Direct-IO硬盘,改为SCSI硬盘再保存重启,一切就正常了.
以上.
添加评论
GB2312 https://www.m5home.com/blog/trackback.php?id=154&encode=gb2312
UTF-8 https://www.m5home.com/blog/trackback.php?id=154&encode=utf-8