Search code examples
node.jsangularangular-clinode-modulesganache

Can't resolve 'fs', Truffle Box for Angular


I am working on an Ethereum decentralized app by following this guide: https://github.com/Quintor/angular-truffle-box

This requires:

truffle
@angular/cli
ganache-cli

I have tried some tricks like npm update fs, setting fs to false in the browser like this:

"browser": {
    "fs": false,
    "path": false,
    "os": false
  }

Yet none of these seem to work and I keep getting errors in ./node_modules/node-dir/lib/paths.js readfilesstream.js and readfiles.js


Solution

  • Instead of using truffle unbox Quintor/angular-truffle-box I just cloned the master branch angular-truffle-box-master.

    From there on I opened a terminal and follow along with the tutorial, except for step 2, truffle unbox Quintor/angular-truffle-box.