Search code examples
reduxgoogle-chrome-devtoolselectronngrxredux-devtools

electron cant add redux dev tools, uncaught exception: SyntaxError: Octal literals are not allowed in strict mode


Im trying to add redux dev tools to my project (so I can work better with ngrx 4).

I looked online how to add a dev tool to electron, found 2 ways: 1) using electron dev tools installer electron dev tools installer

2)Manually, like how the docs explain (taking it from chrome extension folder) electron doc about dev tools The example in this doc is showing how to download the redux dev tool that I need aswell

I'm working in a offline enviroment, where I can bring folders from a different computer to where my project is, but not the other way around. so I coudln't think of a way to use option 1. So I'm trying option 2.

Like the docs instructed me too, I added the redux dev tools to chrome, then I took the folder of the extension and copied it as is to the computer my electron project it. (To same path of chrome extension like in the computer I originally download it had it).

Then, in my electron project main.js, in a part of my code that is inside the app ready event, I called:

BrowserWindow.addDevToolsExtension(pathToReduxDevTools);

When I start my application using electron, I get the following javascript error in main process:

Uncaught Exception:
*Path to the extension in my computer*

SyntaxError: Octal literals are not alloeed in strict mode.
at exports.runInThisContext
at Module._compile
at .... (more ats, I can't copy them all, but you get the idea)

Im using electron 1.2.5 on windows, if you are going to suggest me to update my electron version, ill have to say I can't do that, I also have errors when updating it (not connected to redux dev tools), which I also asked a question about here.

To sum up, if someone has an idea how I can use option 1 in a offline enviroment, that might help me fix the problem. I would prefer a solution to working with option 2, some way to fix this strange error? to me it looks like the error connected to the redux dev tools code, but i'm not sure why it happens and I couldn't find online anyone else that was struggling with this tool and had this error.

UPDATE Managed to update to latest electron, still same problem occurs


Solution

  • Well, it turns out I accidentally downloaded react dev tools instead of redux devtools :X, moral of the story is to double check before you download extensions