Error messages upon save of configuration
Closed this issue · 2 comments
As soon as I open Phoenix or save the main phoenix.js
config file, I get
Commenting out spaces-related configs does not solve it. In fact, the only way I have found to avoid the error message is to comment out everything except the top 2 require lines.
I have not been able to find the log files, so I have not been able to get any information from them about the nature of the problem. (There are no logs related to Phoenix in ~/Library/Logs
or in ~/.config/phoenix
, and I'm not sure where else to look.)
🤦♂️ D'oh! Console.log.... okay.... looking....
Okay, with the spaces-related stuff commented out, I get this:
1/19/18 12:36:16.788 PM Phoenix[287]: SyntaxError: Unexpected identifier 'hashes' (4:8)
ag
tells me that hashes
is in magic/developer_tools.js
. Opening it shows me:
/* DEVELOPER TOOLS */
let hashes = [];
Since let
is more recent, I would expect Babel to be used as the processor for your config file, but I don't see any shebang line with babel
in the main phoenix.js
file (or in magic/developer_tools.js
). Once I add the shebang line, and install babel globally, I get:
1/19/18 1:14:36.691 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.692 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.694 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.696 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.698 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.700 PM Phoenix[287]: SyntaxError: Unexpected token '>' (6:8)
1/19/18 1:14:36.701 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.703 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.709 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.710 PM Phoenix[287]: SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration. (4:8)
1/19/18 1:14:36.712 PM Phoenix[287]: SyntaxError: Unexpected token ')' (4:8)
1/19/18 1:14:36.714 PM Phoenix[287]: ReferenceError: Can't find variable: setHandlers (11:12)
1/19/18 1:14:36.716 PM Phoenix[287]: SyntaxError: Unexpected token ')' (6:8)
1/19/18 1:14:36.717 PM Phoenix[287]: SyntaxError: Unexpected token '>' (17:8)
1/19/18 1:14:36.719 PM Phoenix[287]: SyntaxError: Unexpected token ')' (4:8)
1/19/18 1:14:36.721 PM Phoenix[287]: SyntaxError: Unexpected token ')' (4:8)
1/19/18 1:14:36.722 PM Phoenix[287]: ReferenceError: Can't find variable: setHandlers (11:12)
1/19/18 1:14:36.724 PM Phoenix[287]: ReferenceError: Can't find variable: setHandlers (9:12)
1/19/18 1:14:36.726 PM Phoenix[287]: ReferenceError: Can't find variable: setHandlers (11:12)
1/19/18 1:14:36.727 PM Phoenix[287]: SyntaxError: Unexpected identifier 'lastQuitTimestamp' (4:8)
1/19/18 1:14:36.729 PM Phoenix[287]: SyntaxError: Unexpected token ')' (4:8)
1/19/18 1:14:36.730 PM Phoenix[287]: SyntaxError: Unexpected token ')' (4:8)
1/19/18 1:14:36.732 PM Phoenix[287]: ReferenceError: Can't find variable: setHandlers (10:12)
1/19/18 1:14:36.734 PM Phoenix[287]: SyntaxError: Unexpected identifier 'hashes' (4:8)
1/19/18 1:14:36.740 PM Phoenix[287]: Context loaded.
I also get that notification sometimes when I restart Phoenix, all the shortcuts work though, are they not working for you?
Phoenix's docs say:
Currently, the supported version of JavaScript is based on the ECMAScript 6 standard. macOS versions prior to Sierra (10.12) support ECMAScript 5.1.
So there shouldn't be any need for a transpilation step if you're running macOS >= v10.12. What version are you on?
Adding a #!/usr/bin/env babel
shebang should work anyway, perhaps it should be added to every single file though, not just phoenix.js
, I'm not sure.
I also get that notification sometimes when I restart Phoenix
Fixed.