dynamicstrategies / cardano-wallet-connector

Cardano DApps Wallet Connector - example code
MIT License
131 stars 88 forks source link

Does not work as is #2

Closed marcoarroyo41 closed 2 years ago

marcoarroyo41 commented 2 years ago

Hello,

When I clone the repo, change directory into it, and npm install && npm start I get the following error. It does not seem to work as is, do I need to update any files?

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF69B3B7B7F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114079 2: 00007FF69B344546 DSA_meth_get_flags+65542 3: 00007FF69B3453FD node::OnFatalError+301 4: 00007FF69BC7B29E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF69BC6587D v8::SharedArrayBuffer::Externalize+781 6: 00007FF69BB08C4C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468 7: 00007FF69BB05D64 v8::internal::Heap::CollectGarbage+4244 8: 00007FF69BB036E0 v8::internal::Heap::AllocateExternalBackingStore+2000 9: 00007FF69BB28266 v8::internal::Factory::NewFillerObject+214 10: 00007FF69B85A735 v8::internal::DateCache::Weekday+1797 11: 00007FF69BD08F91 v8::internal::SetupIsolateDelegate::SetupHeap+494417 12: 0000021900C1F2A0

dshibaev commented 2 years ago

Hi,

This is normally cause by insufficient memory

Try running export NODE_OPTIONS="--max-old-space-size=8192" before running npm start

marcoarroyo41 commented 2 years ago

I'm doing this in PowerShell in a Windows 10 VM with 32gb of RAM. Should I theoretically be able to just git clone the repo, cd into the folder, npm install and npm start run and it just work as is?

dynamicstrategies commented 2 years ago

There is a good discussion about this on stackexchange if you want to get into the details:

https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas

The package that causes the error is the cardano-serialization-lib btw

Try if running the suggested command removes the error. I have added it to the troubleshooting section in the Readme

On Fri, Mar 4, 2022, 22:02 marcoarroyo41 @.***> wrote:

I'm doing this in PowerShell in a Windows 10 VM with 32gb of RAM. Should I theoretically be able to just git clone the repo, cd into the folder, npm install and npm start run and it just work as is?

— Reply to this email directly, view it on GitHub https://github.com/dynamicstrategies/cardano-wallet-connector/issues/2#issuecomment-1059563379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR54XQAA7MVE6IYJV7HULXDU6KCBFANCNFSM5P4OTOGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>

marcoarroyo41 commented 2 years ago

I switched to Linux and ran that command, different error this time haha. Is there any other configuration required or any commands besides just downloading the repo and npm install and start run?

Html Webpack Plugin: Error: Child compilation failed: Module.createRequire is not a function

marcoarroyo41 commented 2 years ago

I upgraded to Nodejs version 14 and that fixed it!

dshibaev commented 2 years ago

Great!

I've also updated the Readme that requires Nodejs version 14 or higher

On Fri, Mar 4, 2022, 22:22 marcoarroyo41 @.***> wrote:

I upgraded to Nodejs version 14 and that fixed it!

— Reply to this email directly, view it on GitHub https://github.com/dynamicstrategies/cardano-wallet-connector/issues/2#issuecomment-1059575072, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNMMZDUL2K2AB4JEA5P6GDU6KEJXANCNFSM5P4OTOGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.*** com>