TypeError: Cannot read properties of undefined (reading 'startsWith')

TypeError: Cannot read properties of undefined (reading 'startsWith')
    at checkManaged (/home/mikhail/Документы/Work/Labr/node_modules/webpack/lib/FileSystemInfo.js:2030:14)
    at captureNonManaged (/home/mikhail/Документы/Work/Labr/node_modules/webpack/lib/FileSystemInfo.js:2044:10)
    at FileSystemInfo.createSnapshot (/home/mikhail/Документы/Work/Labr/node_modules/webpack/lib/FileSystemInfo.js:2127:25)
    at /home/mikhail/Документы/Work/Labr/node_modules/html-webpack-plugin/lib/file-watcher-api.js:14:36
    at new Promise (<anonymous>)
    at Object.createSnapshot (/home/mikhail/Документы/Work/Labr/node_modules/html-webpack-plugin/lib/file-watcher-api.js:13:10)
    at /home/mikhail/Документы/Work/Labr/node_modules/html-webpack-plugin/lib/cached-child-compiler.js:219:35
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at process.processImmediate (node:internal/timers:447:9)

Node.js v18.14.0


Ответы (1 шт):

Автор решения: yixiao
// Locate this file  
node_modules/.pnpm/[email protected][email protected]/node_modules/html-webpack-plugin/lib/cached-child-compiler.js

// Find this code  
compiledEntriesPromise.then((childCompilationResult) => {  
    // Add code, output error  
    if(childCompilationResult.error) {  
        console.error("Compilation error", childCompilationResult.error)  
    }  
    ...  
})
→ Ссылка