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

Cannot use React dev: multiple console errors #54

Closed
sdkcarlos opened this issue Jun 30, 2017 · 1 comment
Closed

Cannot use React dev: multiple console errors #54

sdkcarlos opened this issue Jun 30, 2017 · 1 comment

Comments

@sdkcarlos
Copy link

Node: v7.7.1
Electron: ~1.6.2

Trying to install the react extension i'm getting more than 86 errors in the console:

Uncaught TypeError: this.on is not a function
    at once (events.js:305)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
events.js:305 Uncaught TypeError: this.on is not a function
    at once (events.js:305)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)
_stream_writable.js:241 Uncaught TypeError: Cannot read property 'ended' of undefined
    at Writable.write (_stream_writable.js:241)
    at CallbacksRegistry.apply (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:48)
    at EventEmitter.<anonymous> (C:\Users\sdkca\Desktop\node-workspace\electron-quick-start\node_modules\electron\dist\resources\ele…:299)
    at emitThree (events.js:116)
    at EventEmitter.emit (events.js:194)

I'm using the module from the renderer process:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Hello World!</title>
    </head>
    
    <body>
        <h1>Hello World!</h1>
        <p>Hello, type some wrong things in the following textarea !</p>
        <textarea rows="5"></textarea>
    </body>

    <script>
        const { default: installExtension, REACT_DEVELOPER_TOOLS } = require('electron-devtools-installer');

        installExtension(REACT_DEVELOPER_TOOLS)
            .then((name) => console.log(`Added Extension:  ${name}`))
            .catch((err) => console.log('An error occurred: ', err));
    </script>

</html>

Any idea of what im doing wrong? The Electron Project is the boilerplate of electron-quick-start.

@MarshallOfSound
Copy link
Owner

@sdkcarlos Try doing it from the main process instead, sometimes the net module doesn't work nicely over remote

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

2 participants