Closed AboElnoor closed 1 year ago
I get the same issue too. It works externally if I run vendor/bin/cache-clean.js --watch
in a separate terminal away from PHP Storm
Interesting, thanks for reporting.
What host OS are you using?
What PHPStorm version are you using?
What is your shell (echo "$SHELL"
)?
What is the installed cache-clean.js version (composer global show mage2tv/magento-cache-clean
)?
I'm using Mac OS 11.6.1 , PHP Storm 2022.1.3 with /bin/bash as the shell
Below is the composer output
Changed current directory to /Users/jamie/.composer
name : mage2tv/magento-cache-clean
descrip. : A faster drop in replacement for bin/magento cache:clean with file watcher
keywords : development, magento, utility
versions : * 1.0.48
type : library
license : BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) (OSI approved) https://spdx.org/licenses/BSD-3-Clause.html#licenseText
homepage : https://github.com/mage2tv/magento-cache-clean
source : [git] https://github.com/mage2tv/magento-cache-clean.git bb1455a58ae32b80485b10e14c551582cac19034
dist : [zip] https://api.github.com/repos/mage2tv/magento-cache-clean/zipball/bb1455a58ae32b80485b10e14c551582cac19034 bb1455a58ae32b80485b10e14c551582cac19034
path : /Users/jamie/.composer/vendor/mage2tv/magento-cache-clean
names : mage2tv/magento-cache-clean
support
issues : https://github.com/mage2tv/magento-cache-clean/issues
source : https://github.com/mage2tv/magento-cache-clean/tree/1.0.48
I have the same problem on Mac OS 12.4 (21F79), PhpStorm 2022.1.4, shell /bin/zsh and mage2tv/magento-cache-clean v1.0.48.
/opt/homebrew/bin/node /Users/maksold/www/jr233/vendor/bin/cache-clean.js -w
/Users/maksold/www/jr233/vendor/bin/cache-clean.js:3
# Support bash to support `source` with fallback on $0 if this does not run with bash
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1049:15)
at Module._compile (node:internal/modules/cjs/loader:1084:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
at Module.load (node:internal/modules/cjs/loader:998:32)
at Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
Node.js v18.6.0
Process finished with exit code 1
name : mage2tv/magento-cache-clean
descrip. : A faster drop in replacement for bin/magento cache:clean with file watcher
keywords : development, magento, utility
versions : * 1.0.48
type : library
license : BSD 3-Clause "New" or "Revised" License (BSD-3-Clause) (OSI approved) https://spdx.org/licenses/BSD-3-Clause.html#licenseText
homepage : https://github.com/mage2tv/magento-cache-clean
source : [git] https://github.com/mage2tv/magento-cache-clean.git bb1455a58ae32b80485b10e14c551582cac19034
dist : [zip] https://api.github.com/repos/mage2tv/magento-cache-clean/zipball/bb1455a58ae32b80485b10e14c551582cac19034 bb1455a58ae32b80485b10e14c551582cac19034
path : /Users/maksold/www/jr233/vendor/mage2tv/magento-cache-clean
names : mage2tv/magento-cache-clean
support
issues : https://github.com/mage2tv/magento-cache-clean/issues
source : https://github.com/mage2tv/magento-cache-clean/tree/1.0.48
The solution is to run as a shell script. Below is PHPStorm config:
P.S. Hotkeys are working.
I don't know what happened makes it stopped working suddenly.
Here is the error that I get:![Screenshot-20220619222624-751x367](https://user-images.githubusercontent.com/16509141/174499249-4f9566b3-daaa-407b-b23a-200aa522cc14.png)