airgap-it / airgap-vault

The AirGap Vault is installed on a spare smartphone that has no connection to any network, thus it is air gapped. This app handles the private key.
MIT License
373 stars 105 forks source link

Npm install fail #184

Closed LalJoncoux-Aydin closed 1 year ago

LalJoncoux-Aydin commented 1 year ago

Hi all, I don't seem to be able to run npm install , I run into the issue bellow Failing at script : "postinstall": "jetifier && node apply-diagnostic-modules.js && node fix-qrscanner-gradle.js && yarn browserify-coinlib", more precisely at execution of node fix-qrscanner-gradle.js AirgapVaultIssue1 This is the state of fix-qrscanner-gradle.js in master AirgapVaultIssue2 I made sure to verify data variable data type is string. This data is imported from cordova config file located in node_modules folder : cordova-plugin-qrscanner-11/src/android/qrscanner.gradle. Everything seems to be fine with the reading of this file. So the issue seem to be coming directly from the replaceAll function

I tried different fixes but the only one that seems to work was the one stated on this website : https://www.designcise.com/web/tutorial/how-to-fix-replaceall-is-not-a-function-javascript-error So changing replaceAll back to old replace function

Final working file being the one bellow AirgapVaultIssue3

Everything seem to work just fine this way. Please let me know if the issue is coming from local config/package/versions

LalJoncoux-Aydin commented 1 year ago

Issue was local just needed to update my node version ;)