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.

Issue when using browserify instructions on bitcoinjs.org

See original GitHub issue

I used the compile for browser instructions on bitcoinjs.org

and the follow error was shown

`as-MacBook-Pro:test a$ sudo npm install -g browserify uglify-js /usr/local/bin/uglifyjs -> /usr/local/lib/node_modules/uglify-js/bin/uglifyjs /usr/local/bin/browserify -> /usr/local/lib/node_modules/browserify/bin/cmd.js

  • uglify-js@3.1.1
  • browserify@14.4.0 added 135 packages in 8.086s as-MacBook-Pro:test a$ browserify -r bitcoinjs-lib -s bitcoin | uglifyjs > bitcoinjs.min.js Parse error at 0:96,4 let ALPHABET = ‘qpzry9x8gf2tvdw0s3jn54khce6mua7l’ ^ ERROR: Unexpected token: name (ALPHABET) at JS_Parse_Error.get (eval at <anonymous> (/usr/local/lib/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:79:23) at fatal (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:268:52) at run (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:225:9) at Socket.<anonymous> (/usr/local/lib/node_modules/uglify-js/bin/uglifyjs:163:9) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1047:12) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9)`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
junderwcommented, Sep 23, 2017

Hey Christian.

What version of node are you using? Try switching nvm to use v7

1reaction
mandelmonkeycommented, Sep 25, 2017

thanks I managed to browserify using the github readme instructions https://github.com/bitcoinjs/bitcoinjs-lib#browser

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use BitcoinJS in a normal website? (not using node.js ...
The getting started instructions at bitcoinjs.org seem to involve "$ npm" but I don't know what $ is (is that from jquery, or...
Read more >
bitcoinjs-lib/README.md - UNPKG
45 ; 46, ### Browser ; 47, The recommended method of using `bitcoinjs-lib` in your browser is through [Browserify](https://github.com/substack/node-browserify).
Read more >
bitcoinjs-lib - npm
A javascript Bitcoin library for node.js and browsers. Released under the terms of the MIT LICENSE. Should I use this in production? If...
Read more >
Error using React Native using bitcoinjs-lib and ECpair / tiny ...
In this example here github.com/bitcoinjs/tiny-secp256k1#examples (see React App) they get it to work for web. So I think it should execute fine ...
Read more >
RanchiMall/bitcoinjs-lib: A javascript Bitcoin library ... - Codeberg
The recommended method of using bitcoinjs-lib in your browser is through Browserify. If you're familiar with how to use browserify, ignore this and...
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