Can't import "blockchain.info" to Node.js.. Need help.

0 votes

I am working on an Aurelia project.

I've installed blockchain.info using the following command npm install --save blockchain.info

The installation is successful. Now, i want to import the "blockchain.info" to Node.js but when i try to use require('blockchain.info') statement in app.js file, it shows up as a html tag as follows <script src="src/blockchain.info.js"> even though I do not have the file specified as the source.

Why is this happening? How do I import "blockchain.info"?

Jun 27, 2018 in Blockchain by digger
• 27,630 points
56 views

1 answer to this question.

+1 vote
Best answer
Aurelia is a client-side framework and blockchain is server-side.

You are trying use NodeJS's require as the require from RequireJS

You can not use a server-side library/function on the client-side.

You need to use require from RequireJS on the client side to import blockchain.info
answered Jun 27, 2018 by Omkar
• 67,290 points

selected Jun 27, 2018 by digger

Related Questions In Blockchain

0 votes
1 answer

How to create tokens in smart contracts from node.js?

Any modification to the Ethereum Blockchain will ...READ MORE

answered Jun 26, 2018 in Blockchain by Shashank
• 10,330 points
134 views
0 votes
1 answer

In a non-cryptocurrency implementation of Blockchain, how to successfully mine a node?

Difficulty is a property of the blockchain, ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,010 points
40 views
0 votes
1 answer

How to send Bitcoins with node.js?

This website https://blockr.io/tx/push will successfully do the bitcoin transaction. You ...READ MORE

answered Jul 20, 2018 in Blockchain by Christine
• 15,790 points
321 views
0 votes
1 answer

How to check history of blockchain.info wallet?

In the link you mentioned(https://blockchain.info/q), there are ...READ MORE

answered Jul 23, 2018 in Blockchain by slayer
• 29,050 points
43 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
126 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
128 views
0 votes
0 answers

Blockchain.info wallet API callback

I am implementing blockchain.info wallet api to ...READ MORE

Jul 4, 2018 in Blockchain by sabby
• 4,350 points
148 views
0 votes
1 answer

Hyperledger Composer rest server NPM versions

The Hyperledger Composer pre-requisites can be installed ...READ MORE

answered Jul 13, 2018 in Blockchain by Christine
• 15,790 points
86 views
0 votes
1 answer

How to choose which function is called first in Node Js

You can do something like: infuraProvider.getBlockNumber().then(function(blockNumber) { ...READ MORE

answered Oct 8, 2018 in Blockchain by Omkar
• 67,290 points
50 views
0 votes
1 answer

Docker: How to connect Node.js in container to Hyperledger Fabric?

You need to map ~/.composer/cards of your Docker host ...READ MORE

answered Oct 31, 2018 in Blockchain by Omkar
• 67,290 points
83 views