Node.js error - TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string

Hi

I was prompted to update PHPMaker to V2025.10

Update seemed fine, I made some changes and the went to generate the files and I now get this error message

Running C:\nvm4w\nodejs\node.exe (v16.20.2)…
PHP 8.1.31 (cli) (built: Nov 19 2024 16:43:34) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.31, Copyright (c) Zend Technologies
Hashing password…
Verifying password…
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
at new NodeError (node:internal/errors:387:5)
at validateString (node:internal/validators:162:11)
at Object.join (node:path:429:7)
at C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:286711
at Array.filter ()
at global.CompileExtensions (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:286688)
at main (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:291203)
at Object. (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:292333)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1252:10) {
code: ‘ERR_INVALID_ARG_TYPE’
}

Help appreciated

Kind Regards
John B

If you are a registered user, make sure you update the template and the extensions first. If you use old projects with extensions you don’t have in v2025, you may get such error. Click Tools → Extensions, check the extensions, remove third-party or your own extensions, or extensions that do not exist for v2025, click OK and save. If PHPMaker prompts that some extensions not found or should be removed, don’t just ignore.

You may also delete C:\Users\<user>\AppData\Roaming\phpmaker2025 and try again.

Hi

So did those actions and now i get this error

John B

You use:

node.exe (v16.20.2)

PHPMaker v2025 requires:

See System Requirements.

Hi

I have updated node.exe as suggested but I’m still getting errors

I have my project files so can i uninstall PHPMaker an remove all traces from my PC and then do a fresh install - ?

Kind Regards
John Berman

Hi

Further to this

I uninstalled PHPMaker and remove the folder in Appsdata

Did a fresh install and made sure im running Node V20.3

I started the app updated the template, checked and the extension and actually unticked them then when to generate the project and i get this

Verifying password…
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
at new NodeError (node:internal/errors:387:5)
at validateString (node:internal/validators:162:11)
at Object.join (node:path:429:7)
at C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:286711
at Array.filter ()
at global.CompileExtensions (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:286688)
at main (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:291203)
at Object. (C:\Users\jberm\AppData\Roaming\PHPMaker2025\node_modules@phpmaker\core\phpmaker.js:8:292333)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1252:10) {
code: ‘ERR_INVALID_ARG_TYPE’
}

So im a bit lost but really need help please

Kind Regards
John Berman

You should use Node >= v22.

You may refer to this topic, too: Error ERR_INVALID_ARG_TYPE while Generating [Resolved]