This morning suddenly I can't build my projects: c...
# javascript
j
This morning suddenly I can't build my projects: can't find module 'uri-js'. My own code doesn't depend on it, seems to be a webpack thing. Any ideas? Tried clean, gradle resync, invalidate caches/restart, so far.
s
Could you provide the exact error message please?
j
Copy code
internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module 'uri-js'
Require stack:
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\ajv\lib\compile\resolve.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\ajv\lib\compile\index.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\ajv\lib\ajv.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\schema-utils\src\validateOptions.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\schema-utils\src\index.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\webpack\lib\SourceMapDevToolPlugin.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\webpack\lib\WebpackOptionsApply.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\webpack\lib\webpack.js
- E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\webpack-dev-server\bin\webpack-dev-server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (E:\SoftDev\Projects\Kotlin\JS\ThreadTest\build\js\node_modules\ajv\lib\compile\resolve.js:3:11)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\ajv\\lib\\compile\\resolve.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\ajv\\lib\\compile\\index.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\ajv\\lib\\ajv.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\schema-utils\\src\\validateOptions.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\schema-utils\\src\\index.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\webpack\\lib\\SourceMapDevToolPlugin.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\webpack\\lib\\WebpackOptionsApply.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\webpack\\lib\\webpack.js',
    'E:\\SoftDev\\Projects\\Kotlin\\JS\\ThreadTest\\build\\js\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
  ]
}
Ah, finding and deleting the entire yarn cache + clean + restart/invalidate + build, that did the trick
👍 2