razer-chroma icon indicating copy to clipboard operation
razer-chroma copied to clipboard

exports already declared Node/Electron

Open EldoranDev opened this issue 7 years ago • 4 comments

I just wanted to use this project in side of my electron app and got the following error.

SyntaxError: Identifier 'exports' has already been declared

I tried in an empty node project and got the same error.

Electron: 1.6.2 Node: 7.7.2

EldoranDev avatar Mar 30 '17 16:03 EldoranDev

I have the same issue when trying to go from a clean install and using the sample in the README.

Tried with Node and with Electron. Node: 7.2.1 Electron: 1.6.5

D:\NodeJS\razer\node_modules\razer-chroma\boot.js:1 (function (exports, require, module, __filename, __dirname) { let exports ^^^^^^^ SyntaxError: Identifier 'exports' has already been declared at Object.exports.runInThisContext (vm.js:78:16) at Module._compile (module.js:543:28) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object.<anonymous> (D:\NodeJS\razer\index.js:1:78) at Module._compile (module.js:571:32)

tmfksoft avatar Jul 18 '17 22:07 tmfksoft

Though I fixed this by removing line 1 of boot.js

tmfksoft avatar Jul 18 '17 22:07 tmfksoft

This fix worked for me too. Do you want to create pull request fixing that?

ch3rn0v avatar Dec 10 '17 13:12 ch3rn0v

What line did you remove?

KriyenKP avatar Jul 03 '18 16:07 KriyenKP