When I ran truffle init, I got this error:

+3 votes
Error: Cannot find module 'original-require'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\webpack:\external "original-require":1:1)
    at __webpack_require__ (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\webpack:\webpack\bootstrap 1e465420bd4a8d34abd9:19:1)
    at Object.<anonymous> (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-config\index.js:8:1)
    at Object.<anonymous> (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:2394:30)
    at __webpack_require__ (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\webpack:\webpack\bootstrap 1e465420bd4a8d34abd9:19:1)
    at Object.<anonymous> (C:\Users\saura\AppData\Roaming\npm\node_modules\truffle\build\webpack:\~\truffle-core\cli.js:3:1)

How can I solve it?

Oct 29, 2018 in Blockchain by Davidala
• 150 points
65 views

1 answer to this question.

+2 votes

Hey there @Davidala!
The error says that it couldn't find the 'original-require' module.
The solution to this error is to install this module.
To install the module, run the following command:

npm install original-require

This should work.

answered Oct 29, 2018 by Omkar
• 68,180 points

Related Questions In Blockchain

0 votes
0 answers

When running the enrollAdmin.js i get this error:

Wallet path: C:\Users\Nibir Hira\go\src\github.com\hyperledger\fabric-samples\fa bcar\javascript\wallet 2019-03-29T04:07:44.902Z - error: [FabricCAClientService.js]: ...READ MORE

Mar 29 in Blockchain by anonymous

recategorized Mar 29 by Omkar 360 views
0 votes
1 answer

Getting error when i execute ./byfn.sh -m up command.

The error is caused because you're trying ...READ MORE

answered Jul 12, 2018 in Blockchain by slayer
• 29,240 points
206 views
0 votes
1 answer

Truffle init: throw er; // Unhandled 'error' event

Modified the cli.bundled.js: replaced https.request with request Diff: ...READ MORE

answered Sep 27, 2018 in Blockchain by digger
• 26,600 points
350 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,810 points
185 views
0 votes
1 answer
0 votes
1 answer

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

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,340 points
100 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
• 68,180 points
201 views