Building of admin after update from v4.6.0 to v4.7.0 fail because many of modules missing

System Information
  • Strapi Version: v4.7.0
  • Operating System: CentOS Linux 7.9.2009
  • Database: PostgreSQL version 14.7
  • Node Version: v14.21.3
  • NPM Version: 9.6.5
  • Yarn Version: -

[root@graylog strapi]# npm run build

strapi@0.1.0 build
strapi build

Starting the compilation for TypeScript files in /root/strapi
Building your admin UI with development configuration…

● Webpack █████████████████████████ building (36%) 0/1 entries 9138/9172 dependencies 2408/2544 modules 132 active
node_modules/lodash/_baseIndexOf.js

ModuleNotFoundError: Module not found: Error: Can’t resolve ‘for-each’ in ‘/root/strapi/node_modules/which-typed-array’
at /root/strapi/node_modules/webpack/lib/Compilation.js:2016:28
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:805:13
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:272:22
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:436:22
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:118:11
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:677:25
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:881:8
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:1001:5
at /root/strapi/node_modules/neo-async/async.js:6883:13
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:984:45
at finishWithoutResolve (/root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:320:11)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:394:15
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:41:15
at processTicksAndRejections (internal/process/task_queues.js:81:21)
resolve ‘for-each’ in ‘/root/strapi/node_modules/which-typed-array’
Parsed request is a module
using description file: /root/strapi/node_modules/which-typed-array/package.json (relative path: .)
Field ‘browser’ doesn’t contain a valid alias configuration
resolve as module
/root/strapi/node_modules/which-typed-array/node_modules doesn’t exist or is not a directory
/root/strapi/node_modules/node_modules doesn’t exist or is not a directory
looking for modules in /root/strapi/node_modules
single file module
using description file: /root/strapi/package.json (relative path: ./node_modules/for-each)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.js doesn’t exist
.jsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.jsx doesn’t exist
.react.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.react.js doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.ts doesn’t exist
.tsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.tsx doesn’t exist
/root/strapi/node_modules/for-each doesn’t exist
/root/node_modules doesn’t exist or is not a directory
/node_modules doesn’t exist or is not a directory
looking for modules in /root/strapi/node_modules/@strapi/admin/node_modules
single file module
using description file: /root/strapi/node_modules/@strapi/admin/package.json (relative path: ./node_modules/for-each)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.js doesn’t exist
.jsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.jsx doesn’t exist
.react.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.react.js doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.ts doesn’t exist
.tsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.tsx doesn’t exist
/root/strapi/node_modules/@strapi/admin/node_modules/for-each doesn’t exist
ModuleNotFoundError: Module not found: Error: Can’t resolve ‘for-each’ in ‘/root/strapi/node_modules/which-typed-array’
at /root/strapi/node_modules/webpack/lib/Compilation.js:2016:28
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:805:13
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :10:1)
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:272:22
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:436:22
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:118:11
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:677:25
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:881:8
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:1001:5
at /root/strapi/node_modules/neo-async/async.js:6883:13
at /root/strapi/node_modules/webpack/lib/NormalModuleFactory.js:984:45
at finishWithoutResolve (/root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:320:11)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:394:15
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :16:1)
at /root/strapi/node_modules/enhanced-resolve/lib/Resolver.js:443:5
at eval (eval at create (/root/strapi/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /root/strapi/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:41:15
at processTicksAndRejections (internal/process/task_queues.js:81:21)
resolve ‘for-each’ in ‘/root/strapi/node_modules/which-typed-array’
Parsed request is a module
using description file: /root/strapi/node_modules/which-typed-array/package.json (relative path: .)
Field ‘browser’ doesn’t contain a valid alias configuration
resolve as module
/root/strapi/node_modules/which-typed-array/node_modules doesn’t exist or is not a directory
/root/strapi/node_modules/node_modules doesn’t exist or is not a directory
looking for modules in /root/strapi/node_modules
single file module
using description file: /root/strapi/package.json (relative path: ./node_modules/for-each)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.js doesn’t exist
.jsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.jsx doesn’t exist
.react.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.react.js doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.ts doesn’t exist
.tsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/for-each.tsx doesn’t exist
/root/strapi/node_modules/for-each doesn’t exist
/root/node_modules doesn’t exist or is not a directory
/node_modules doesn’t exist or is not a directory
looking for modules in /root/strapi/node_modules/@strapi/admin/node_modules
single file module
using description file: /root/strapi/node_modules/@strapi/admin/package.json (relative path: ./node_modules/for-each)
no extension
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each doesn’t exist
.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.js doesn’t exist
.jsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.jsx doesn’t exist
.react.js
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.react.js doesn’t exist
.ts
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.ts doesn’t exist
.tsx
Field ‘browser’ doesn’t contain a valid alias configuration
/root/strapi/node_modules/@strapi/admin/node_modules/for-each.tsx doesn’t exist
/root/strapi/node_modules/@strapi/admin/node_modules/for-each doesn’t exist

You can try to update to a higer version what should work if there are no migration guides