Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing on watch #79

Closed
lfolco opened this issue May 18, 2020 · 6 comments
Closed

Crashing on watch #79

lfolco opened this issue May 18, 2020 · 6 comments

Comments

@lfolco
Copy link

lfolco commented May 18, 2020

Getting this error since upgrading to 1.2.8:

/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:361
function ij(a){Z.g(Nh,T(["Reading app config by shelling out to php"]));a=hj(a);if(!t(wi(a)))throw Tg(["File env.php not found: ",a].join(""),ve);a=gj.execSync(["php -r \"echo json_encode((require '",a,"') ?? []);\""].join(""));a=Pg(Qi(a),T([Qg,!0]));return Re.b(ve,a)}
                                                                                             ^
Sg [Error]: File env.php not found: /Users/lfolco/Sites/coffee/local/m2cof/app/etc/env.php
    at new Sg (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:328:24)
    at Tg (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:329:75)
    at ij (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:361:100)
    at Function.g [as m] (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:161:240)
    at Function.<anonymous> (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:371:18)
    at ke (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:141:272)
    at oe (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:146:119)
    at e (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:370:341)
    at d (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:370:204)
    at Nj (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:371:75) {
  message: 'File env.php not found: /Users/lfolco/Sites/coffee/local/m2cof/app/etc/env.php',
  data: Xa { o: null, j: 0, c: [], v: -15128758, i: 16647951, B: 139268 },
  bc: null,
  name: 'Error',
  description: undefined,
  fileName: undefined,
  lineNumber: undefined,
  columnNumber: undefined,
  stack: 'Error: File env.php not found: /Users/lfolco/Sites/coffee/local/m2cof/app/etc/env.php\n' +
    '    at new Sg (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:328:24)\n' +
    '    at Tg (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:329:75)\n' +
    '    at ij (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:361:100)\n' +
    '    at Function.g [as m] (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:161:240)\n' +
    '    at Function.<anonymous> (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:371:18)\n' +
    '    at ke (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:141:272)\n' +
    '    at oe (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:146:119)\n' +
    '    at e (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:370:341)\n' +
    '    at d (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:370:204)\n' +
    '    at Nj (/Users/lfolco/Sites/coffee/local/m2cof/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js:371:75)'
}
@gjportegies
Copy link

gjportegies commented May 18, 2020

@lfolco does the file env.php exists? Should be located /Users/lfolco/Sites/coffee/local/m2cof/app/etc/env.php (https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-envphp.html)

@lfolco
Copy link
Author

lfolco commented May 18, 2020

It does.

@Vinai
Copy link
Contributor

Vinai commented May 20, 2020

Okay... this is a strange one.
What is the exact command that you use to invoke the script?

@lfolco
Copy link
Author

lfolco commented May 20, 2020

vendor/bin/cache-clean.js -w

@Vinai
Copy link
Contributor

Vinai commented May 20, 2020

Could you please run it with the -w -vv flags and paste the full output here? Thank you.

@lfolco
Copy link
Author

lfolco commented May 21, 2020

Oh snap my bad: I was running data migrations repeatedly and resetting the Magento environment with each iteration, so indeed there was no env.php.

Nothing else to see here, folks, let's just move it along like this never happened...

@lfolco lfolco closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants