SwapyNetwork / electron-metamask-boilerplate

Easily create a desktop version of your dApp using Electron (Muon) + MetaMask.
96 stars 72 forks source link

install error #8

Open tiziru opened 6 years ago

tiziru commented 6 years ago
root@alex-All-Series:~/electron-metamask-boilerplate# sudo npm install electron --unsafe-perm=true

> electron@3.0.6 postinstall /home/alex/electron-metamask-boilerplate/node_modules/electron
> node install.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-win@2.1.1 (node_modules/7zip-bin-win):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-win@2.1.1: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@1.0.1 (node_modules/7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 7zip-bin-mac@1.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ electron@3.0.6
updated 1 package and audited 1601 packages in 4.335s
found 44 vulnerabilities (8 low, 28 moderate, 8 high)
  run `npm audit fix` to fix them, or `npm audit` for details
root@alex-All-Series:~/electron-metamask-boilerplate# sudo node main
/home/alex/electron-metamask-boilerplate/main.js:64
app.on('ready', createWindow);
    ^

TypeError: Cannot read property 'on' of undefined
    at Object.<anonymous> (/home/alex/electron-metamask-boilerplate/main.js:64:5)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
    at Module.load (internal/modules/cjs/loader.js:605:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
    at Function.Module._load (internal/modules/cjs/loader.js:536:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:760:12)
    at startup (internal/bootstrap/node.js:303:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:872:3)
root@alex-All-Series:~/electron-metamask-boilerplate# sudo node setup
/bin/sh: 1: electron: not found
process exited with code 127
root@alex-All-Series:~/electron-metamask-boilerplate# 
tiziru commented 6 years ago
root@alex-All-Series:~/electron-metamask-boilerplate# node -v
v11.0.0
root@alex-All-Series:~/electron-metamask-boilerplate# npm -v
6.4.1
root@alex-All-Series:~/electron-metamask-boilerplate# 
tiziru commented 6 years ago

Can you please add mode setup info in your readme.md?

What I need to have into /extensions/metamask? I added this https://github.com/MetaMask/metamask-extension/tree/develop/app

What is correct way?

alex@alex-All-Series:~/boiler$ npm start

> electron-metamask-boilerplate@0.0.1 start /home/alex/boiler
> node setup.js

Electron could not be found. No hard resets for you!
[29457:29457:1030/150038.723066:ERROR:CONSOLE(5)] "Uncaught ReferenceError: Web3 is not defined", source: chrome://brave/home/alex/boiler/your-app/index.js (5)

I see your default template, but I don't see metamask.