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
• 26,740 points
820 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
• 69,210 points

selected Jun 27, 2018 by digger

Related Questions In Blockchain

0 votes
1 answer

CryptoCurrency NODE.js Web3 Ethereum - Can't connect to TESTRPC

Your connection is working. To return an ...READ MORE

answered Apr 12, 2022 in Blockchain by Soham
• 9,700 points
440 views
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 27, 2018 in Blockchain by Shashank
• 10,400 points
1,418 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,100 points
380 views
0 votes
1 answer

How to send Bitcoins with node.js?

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

answered Jul 20, 2018 in Blockchain by Christine
• 15,790 points
3,157 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
1,691 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,610 points
961 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,390 points
715 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
636 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
• 69,210 points
434 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
• 69,210 points
954 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP