Truffle compile Cant find module error

0 votes

First i did

truffle unbox webpack

and then tried to compile 

truffle compile

But I get this error:

Error: Cannot find module 'babel-register'

    at Function.Module._resolveFilename (module.js:547:15)

    at Function.Module._load (module.js:474:25)

    at Module.require (module.js:596:17)

    at require (internal/module.js:11:18)

    at Object.<anonymous> (/home/edureka/truffle/truffle.js:2:1)

    at Module._compile (module.js:652:30)

    at Object.Module._extensions..js (module.js:663:10)

    at Module.load (module.js:565:32)

    at tryModuleLoad (module.js:505:12)

    at Function.Module._load (module.js:497:3)
Dec 1, 2018 in Blockchain by digger
• 26,740 points
2,748 views

2 answers to this question.

0 votes

Seems like the box didn't unbox properly. Delete the file and unbox again:

rm -rf *
truffle unbox webpack
answered Dec 1, 2018 by Omkar
• 69,210 points
0 votes

You can install babel-register and try again. To install babel-register, run this command:

npm install babel-register --save-dev
answered Feb 19, 2019 by Loki

Related Questions In Blockchain

0 votes
1 answer

truffle migrate Error: “Cannot find module 'truffle-expect'”

Seems like you are missing some modules ...READ MORE

answered Jan 24, 2019 in Blockchain by Omkar
• 69,210 points
1,066 views
+1 vote
4 answers
0 votes
4 answers

Hyperledger fabric: enrollAdmin.js Error: Cannot find module 'fabric-client'

Change your directory to fabric-samples/fabrcar. And run: npm ...READ MORE

answered Nov 21, 2018 in Blockchain by Omkar
• 69,210 points
4,610 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,706 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,148 views
0 votes
1 answer

Truffle init: Error: Cannot find module 'original-require'

I think you need to run this ...READ MORE

answered Oct 24, 2018 in Blockchain by Omkar
• 69,210 points
1,749 views
–1 vote
2 answers

Truffle migrate shows Error: Cannot find module 'truffle-expect'

You can also install the basic truffle-expect ...READ MORE

answered Feb 19, 2019 in Blockchain by Rohit
751 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