question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add CDN/prebuilt version for angular

See original GitHub issue

current import (import WalletConnectProvider from "@walletconnect/web3-provider") depends on Node/Commonjs modules like crypto which is not available in browser & angular cli don’t support it, so please add prebuilt CDN version, it is very difficult to integrate with default angular setup with official cli. Here are the errors shown in angular:

ERROR in ./node_modules/@pedrouid/iso-crypto/dist/cjs/helpers/env/node.js Module not found: Error: Can’t resolve ‘crypto’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/@pedrouid/iso-crypto/dist/cjs/helpers/env’

ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js Module not found: Error: Can’t resolve ‘http’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/xhr2-cookies/dist’

ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js Module not found: Error: Can’t resolve ‘https’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/xhr2-cookies/dist’

ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js Module not found: Error: Can’t resolve ‘os’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/xhr2-cookies/dist’

ERROR in ./node_modules/cipher-base/index.js Module not found: Error: Can’t resolve ‘stream’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/cipher-base’

ERROR in ./node_modules/keccak/lib/api/keccak.js Module not found: Error: Can’t resolve ‘stream’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/keccak/lib/api’

ERROR in ./node_modules/keccak/lib/api/shake.js Module not found: Error: Can’t resolve ‘stream’ in ‘/Users/aks/work/projects/akemona-frontend/node_modules/keccak/lib/api’

& Here is the warning:

WARNING in /Users/…/…/projects/…/src/app/…/web3.service.ts depends on ‘@walletconnect/web3-provider’. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pedrouidcommented, Feb 9, 2021

hey @aksdevac @REPTILEHAUS… it’s true that we document this but it’s common practice to distribute both CJS and UMD bundles

All WalletConnect packages can fetched as UMD bundles from unpkg.com

Alternatively you can download the latest minified fields from our releases pages:

https://github.com/walletconnect/walletconnect-monorepo/releases

0reactions
joharzmncommented, Apr 19, 2022

@aksdevac cdn is working fine. But there is one problem I am facing on mobile. When we call SignPersonalMessage function it’s redirecting to the AppStore instead of MetaMask app. Do you know what can be wrong ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started - Angular Material
The ng add command will install Angular Material, the Component Dev Kit (CDK), ... You can choose from prebuilt material design themes or...
Read more >
How to add bootstrap to an angular-cli project - Stack Overflow
This line installs Bootstrap 3 nowadays, but can install Bootstrap 4 in the future. Keep in mind ngx-bootstrap supports both versions. Open src/app/app.module....
Read more >
Getting started with Angular RichTextEditor component
This section explains the steps to create a simple Rich Text Editor component and configure its available functionalities in Angular.
Read more >
Web3js-cdn NPM - npm.io
+ web3js-cdn@1.3.0 ; npm install web3 ; yarn add web3 ; npm run build ; <script src=" · >.
Read more >
angular/fire - npm
The official Angular library for Firebase.. Latest version: 7.5.0, last published: a month ago. Start using @angular/fire in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found