Can not run npm start on strapi v4.12.7

System Information
  • Strapi Version: 4.12.7
  • Operating System: Ubuntu
  • Database: PostgreSQL
  • Node Version: 16.20.2
  • NPM Version: 8.19.4
  • Yarn Version: N/A

When running npm start on example, i got error:

4.12.7/app$ sudo npm start

UDP@0.1.0 start
strapi start
[2023-08-29 14:55:04.525] debug: :no_entry: Server wasn’t able to start properly.
[2023-08-29 14:55:04.534] error: Cannot read properties of undefined (reading ‘visitors’)
TypeError: Cannot read properties of undefined (reading ‘visitors’)
at Object. (/mnt/d/Project/udp/4.12.7/app/node_modules/@strapi/admin/server/services/permission/permissions-manager/validate.js:31:59)

Could you please help?

Use Node 18 with Strapi 4.x.x

@zain.makro,
I updated to nodejs 18.17.1 and npm 9.8.1 and got the same error.

I also checked and saw that there is no validate declaration in node_modules@strapi\utils\dist\index.js file. But the validate declaration is presented in source code https://github.com/strapi/strapi/blob/main/packages/core/utils/src/index.ts.

It means there is problem with build and deploy package @strapi/utils to npm registry, right?

Regard,
Cuong Tran

Hi,
I updated to Release v4.13.1 · strapi/strapi · GitHub and everything works fine now.

Regard,
Cuong Tran