Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Failed to compile #47

Closed
tosho opened this issue Dec 13, 2017 · 8 comments
Closed

Failed to compile #47

tosho opened this issue Dec 13, 2017 · 8 comments

Comments

@tosho
Copy link

tosho commented Dec 13, 2017

Failed to compile

./src/model/Eth/Wallet.js
Module not found: Can't resolve 'web3/packages/web3' in '/home/tosho/apps/DAO.casino/BankRollerApp-4.0.0-beta.0/src/model/Eth'

This error occurred during the build time and cannot be dismissed.

node v.8.1.0

@alexstep
Copy link
Contributor

@tosho
try
npm i -D lerna && npm i

@tosho
Copy link
Author

tosho commented Dec 14, 2017

Compiled successfully!
You can now view BankRoller in the browser.

http://localhost:9998/

Note that the development build is not optimized.
To create a production build, use npm run build.

but there is nothing in the browser window - just blank black page

@alexstep
Copy link
Contributor

@tosho What browser?
Can you see in developer console, maybe have some errors?

@tosho
Copy link
Author

tosho commented Dec 14, 2017

firefox, chrome, brave

Uncaught Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.
at Object.bitcore.versionGuard (index.js:12)
at Object. (index.js:15)
at Object. (index.js:69)
at webpack_require (bootstrap e87375954924f9177083:19)
at Object. (mnemonic.js:3)
at Object.module.exports._from (mnemonic.js:297)
at webpack_require (bootstrap e87375954924f9177083:19)
at Object.bitcore (index.js:1)
at webpack_require (bootstrap e87375954924f9177083:19)
at Object. (keystore.js:8)
if I run electron . in the main dir I got this :

tosho@T440:~/apps/DAO.casino/BankRollerApp-4.0.0-beta.0$ electron .
Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask StackOverflow questions tagged with 'gun'!
0.8 WARNING! Breaking changes, test that your app works before upgrading! The adapter interface has been upgraded (non-default storage and transport layers probably won't work). Also, .path() and .not() are outside core and now in 'lib/'.
initDApps false
/home/tosho/.config/BankRoller/../DApps/

Start electron server with config { config_version: 1,
http_port: 9999,
index_page_url: 'http://localhost:9999',
database: 'database.json',
dapps_path: '/../DApps/' }

WARNING! This file.js module for gun is intended for local development testing only!
A JavaScript error occurred in the main process
Uncaught Exception:
Error: listen EADDRINUSE :::9999
at Object.exports._errnoException (util.js:1050:11)
at exports._exceptionWithHostPort (util.js:1073:20)
at Server.setupListenHandle [as _listen2] (net.js:1263:14)
at listenInCluster (net.js:1304:12)
at Server.listen (net.js:1402:7)
at Object. (/home/tosho/apps/DAO.casino/BankRollerApp-4.0.0-beta.0/build/server.electron.js:337:8)
at Object. (/home/tosho/apps/DAO.casino/BankRollerApp-4.0.0-beta.0/build/server.electron.js:381:3)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)

this is an Electron app right? how to run it properly after the build ?

@alexstep
Copy link
Contributor

Error: listen EADDRINUSE :::9999
ok.
First stop bankrollerApp, kill node proccess if it need. Or stop some service runing on 9999 port.

Be sure that you on last master branch.
git checkout master && git pull

use npm start to start dev server
or npm run build && npm run run_electron to run electron app.

@tosho
Copy link
Author

tosho commented Dec 14, 2017

the app starts but still blank black window only and the same error when I open DevTools:

Uncaught Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.
at Object.bitcore.versionGuard (main.382c63f4.js:109628)
at Object. (main.382c63f4.js:109631)
at Object. (main.382c63f4.js:109687)
at webpack_require (main.382c63f4.js:20)
at Object. (main.382c63f4.js:166991)
at Object.module.exports._from (main.382c63f4.js:167287)
at webpack_require (main.382c63f4.js:20)
at Object.bitcore (main.382c63f4.js:109609)
at webpack_require (main.382c63f4.js:20)
at Object. (main.382c63f4.js:104316)

@alexstep
Copy link
Contributor

@tosho sorry, we really have a bug.
bitpay/bitcore#1454

/BankRollerApp/node_modules/bitcore-lib/index.js line 7,
just replace to
bitcore.versionGuard = function(version) { return;

@tosho
Copy link
Author

tosho commented Dec 15, 2017

that didn't help at first because there is another bitcore-lib folder.

/BankRollerApp/node_modules/bitcore-mnemonic/node_modules/bitcore-lib
/BankRollerApp/node_modules/bitcore-lib

I've changed both files and it is working now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants