bitpay / wallet

Bitpay Wallet (formerly Copay) is a secure Bitcoin and other crypto currencies wallet platform for both desktop and mobile devices.
http://bitpay.com/wallet
MIT License
3.78k stars 1.74k forks source link

(Windows 10) Can't compile. #7928

Open skazhikadyadya opened 6 years ago

skazhikadyadya commented 6 years ago

node v6.10.3 npm v3.10.10 cordova 8.0.0

Steps to reproduce:

git clone https://github.com/bitpay/copay.git
cd copay
npm run apply:copay

When I have:

copay@3.14.0 postinstall D:\dev\copay
> sed -i  -e "s/.*require(...\/...);//g" node_modules/asn1.js-rfc5280/index.js;   bower install

sed: can't read node_modules/asn1.js-rfc5280/index.js;: No such file or directory
sed: can't read bower: No such file or directory
sed: can't read install: No such file or directory

npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "D:\\dev\\copay\\node_modules\\npm\\bin\\npm-cli.js" "i"
npm ERR! node v6.10.3
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE
npm ERR! copay@3.14.0 postinstall: `sed -i  -e "s/.*require(...\/...);//g" node_modules/asn1.js-rfc5280/index.js;   bower install`
npm ERR! Exit status 2

When i try to edit node_modules/asn1.js-rfc5280/index.js like

//try {
  var asn1 = require('asn1.js');
//} catch (e) {
//  var asn1 = require('../'+'..');
//}

and try npm run apply:copay again I see:

npm WARN unmet dependency D:\dev\copay\node_modules\bhttp requires lodash@'^2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\form-data2 requires lodash@'^2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\grunt-jsdox requires lodash@'~2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\platform-overrides requires lodash@'~2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\preconditions requires lodash@'^2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\nw-builder requires lodash@'~2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm WARN unmet dependency D:\dev\copay\node_modules\simple-glob requires lodash@'~2.4.1' but will load
npm WARN unmet dependency D:\dev\copay\node_modules\lodash,
npm WARN unmet dependency which is version 4.17.4
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "D:\\dev\\copay\\node_modules\\npm\\bin\\npm-cli.js" "i" "fs-extra"
npm ERR! node v6.10.3
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package grunt@1.0.1 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-angular-gettext@2.3.8 wants grunt@>=0.4.1
npm ERR! peerinvalid Peer grunt-contrib-concat@1.0.1 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-exec@1.0.1 wants grunt@>=0.4
npm ERR! peerinvalid Peer grunt-nw-builder@2.0.3 wants grunt@^1.0.1
npm ERR! peerinvalid Peer grunt-sass@1.2.1 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer load-grunt-tasks@3.5.2 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-jsdox@0.1.8 wants grunt@~0.4.x

npm ERR! Please include the following file with any support request:
npm ERR!     D:\dev\copay\npm-debug.log
MaksymTikhomirov commented 6 years ago

Ок, покрутим

SmileAjh commented 6 years ago

@skazhikadyadya I have also account for this problem,have you solved it?

skazhikadyadya commented 6 years ago

@anxiaohe, yes, was changed platform to Linux. :)

SmileAjh commented 6 years ago

@skazhikadyadya thanks

mihaifm commented 6 years ago

same problem here

skazhikadyadya commented 6 years ago

@mihaifm are you solved that problem?

sondreb commented 4 years ago

It still won't compile on Windows, currently the issue is usage of "rm" which is not available natively on Windows.

This can be solved by changing "rm" and putting a dev dependency on the "rimraf" package.

Another issue is the use of ";" to split the two tasks to add platforms to cordova. This must be changed into &&.

I could supply a PR for these changes if there is any interest for it?