error during script generation: Cannot read properties of undefined (reading 'CtrlIFiles')

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
brianheim
User
Posts: 36

error during script generation: Cannot read properties of undefined (reading 'CtrlIFiles')

Post by brianheim »

I am having trouble getting past this error.
Background- this project was originally created in PHPMAKER 2019 and has been upgraded through the versions to 2023. other than adjustments to custom files, and other requirements needed to upgrade, it hasn't had any major issues. (following the migration guides)
My other projects generate ok, so I'm pretty certain it's something in the project itself.
I've un installed-re installed including removing the template directories so they regenerate. everything is up to date as of today.
Just not sure what to keep trying. Using php8.1
here is the full error message(s) Any direction to go is appreciated.

TypeError: Cannot read properties of undefined (reading 'CtrlIFiles')
    at C:\Users\bheim\AppData\Roaming\PHPMaker2023\node_modules\@phpmaker\core\phpmaker.js:8:273442
    at Array.forEach (<anonymous>)
    at global.CompileTemplate (C:\Users\bheim\AppData\Roaming\PHPMaker2023\node_modules\@phpmaker\core\phpmaker.js:8:273348)
    at main (C:\Users\bheim\AppData\Roaming\PHPMaker2023\node_modules\@phpmaker\core\phpmaker.js:8:276677)
    at Object.<anonymous> (C:\Users\bheim\AppData\Roaming\PHPMaker2023\node_modules\@phpmaker\core\phpmaker.js:8:277915)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Error(s) occurred. Compilation of .scss files skipped.
Generation completed with error(s), please scroll up (if necessary) to check error(s) highlighted in red.

arbei
User
Posts: 9292

Post by arbei »

Do you try to use any old v2019 files (e.g. extensions or templates) in the new project. They won't work.


brianheim
User
Posts: 36

Post by brianheim »

No, in my case, I was using completely fresh templating(boilerplate from the new install) and nothing custom nor was I attempting to use any old extensions.

I have resolved the issue, however I haven't identified the cause.

I opened a 2020 version that was still saved of that same project, and ran through the update to 2023 again. this one generates scripts without error.

Thanks
B


arbei
User
Posts: 9292

Post by arbei »

You may open your old project in a text editor and remove any old extensions which do not exist in current version, especially if you used some third party (or your own) extensions.


Post Reply