This error occurs when the code is trying to use the "os" module in a dynamic require statement, which is not supported in the current environment.

To fix this error, you can try using a static require statement instead. Change the dynamic require statement like this:

// Dynamic require
const os = require('os');

// Static require
const os = require('os').default;

If the above solution doesn't work, you can also try updating the version of the package causing the error, as newer versions may have resolved this issue

error when starting dev serverError Dynamic require of os is not supported

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

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