Your software
My Mautic version is: 5.2.3
My PHP version is: 8.2
Your problem
My problem is:
I’m trying to setup Mautic in a provided web hosting environment. I managed to install composer, nodeJS, npm, npx and also made sure the right enviroments are used for the installation via composer.
However, in the installation routine at the process step after
“Modernizr build saved to node_modules/modernizr/modernizr-mautic-dist.js” the process crashes, when the routine tries to write to a random file system root directory.
I set all caches an tmp directories to the user directory, but this remains broken.
These errors are showing in the log:
Modernizr build saved to node_modules/modernizr/modernizr-mautic-dist.js
node:fs:2427
return binding.writeFileUtf8(
^
Error: EACCES: permission denied, open ‘/zhSNPnRzVp’
at Object.writeFileSync (node:fs:2427:20)
at l (/node_modules/get-tsconfig/dist/index.cjs:7:11081)
at Object.createFilesMatcher (/node_modules/get-tsconfig/dist/index.cjs:7:11832)
at Object.ESBuildLoader (/node_modules/esbuild-loader/dist/index.cjs:51:35)
at LOADER_EXECUTION (/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
at runSyncOrAsync (/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
at iterateNormalLoaders (/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
at /node_modules/loader-runner/lib/LoaderRunner.js:224:4
at /node_modules/webpack/lib/NormalModule.js:984:15
at eval (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:33:10), :12:1) {
errno: -13,
code: ‘EACCES’,
syscall: ‘open’,
path: ‘/zhSNPnRzVp’
}
I removed parts of the pathes to remove ID Data, but the “path:” detail at the end is a real example: its a random path in the file system root, which of course can’t be written in a shared hosting environment.
Why is it trying to write there? Can I convince the script to write into a tmp path in my user directory?
Steps I have tried to fix the problem:
Tested several ways to set all tmp and cache paths relative into user directory. Mussed have missed one?