This error is caused by the fact that the module being required (in this case, 'trash') is an ES module, which requires the use of import statements instead of require statements. However, the code attempting to require the module is using the older require syntax, which is not supported for ES modules.

To fix this error, you will need to update the code to use import statements instead of require statements. This may involve updating the code in the module that is causing the error, or it may involve updating the code in the file that is trying to require the module. Alternatively, you may be able to find a version of the module that is compatible with the older require syntax.

Electron App Error: 'ERR_REQUIRE_ESM' - ES Module Import Issue

原文地址: http://www.cveoy.top/t/topic/nQlL 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录