Failing to build Strapi (4.0.7)

System Information
  • Strapi Version: 4.0.7
  • Operating System: Ubuntu 22.04
  • Database: postgres 13.3
  • Node Version: 16.14
  • NPM Version: 6.x
  • Yarn Version:

I’m trying to build a strapi based project in a container setup. During the build process I’m getting the following error below before it fails. Clearing out node_modules etc, does not seem to make a difference (and the container is built from scratch so it’s starting from nothing).
I cannot find anything online regarding that specific issue.
Any insight would be helpful. :pray:

strapi    | TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
strapi    |     at new NodeError (node:internal/errors:371:5)
strapi    |     at validateString (node:internal/validators:120:11)
strapi    |     at Object.resolve (node:path:1098:7)
strapi    |     at /opt/app/node_modules/@strapi/admin/index.js:186:33
strapi    |     at Array.filter (<anonymous>)
strapi    |     at createCacheDir (/opt/app/node_modules/@strapi/admin/index.js:184:6)
strapi    |     at (/opt/app/node_modules/@strapi/admin/index.js:59:9)
strapi    |     at async module.exports (/opt/app/node_modules/@strapi/strapi/lib/commands/develop.js:32:11) {
strapi    |   code: 'ERR_INVALID_ARG_TYPE'
strapi    | }
strapi    | error Command failed with exit code 1.

Welcome to the Strapi Community @harel
Just a small tip try upgrade to latest version, see if that fixes the problem.
Also make sure you rebuild your app.

upgrade what to latest version

Sorry try upgrading strapi to the latest version :slight_smile: