I can succesfully run the webpack truffle box on my webserver, but if I try to run a DApp which I made by using the pet-shop truffle box as template, I can only use it on localhost. When I upload the /build and /src folders to the webserver, after compiling and migrating to kovan, the only thing I get is my index.html page... Same goes if I publish to IPFS.

I am not able to use webpack within my pet-shop based DApp, I get (locally):

$ webpack The CLI moved into a separate package: webpack-cli. Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D

I already installed the webpack-cli globally, but nothing to do. I also tried to re-compile my DApp's contracts within the webpack box, migrate them to kovan, copied all required files and ran npm run build (which compiles...), but nothing to do.

Any help would be higly appreciated

  • can you share how did you fix the JSON files, I am trying to host pet shop on IPFS and its fetching only the index.html without pets.json could you share what you have done to fix this issue? – Basem Dabbour Jul 3 '19 at 8:57

Ok... I got it. Actually it was just a problem loading the .json "DB", I needed to check the dev console in order to see where it was getting stuck. So, not a blockchain or js problem, but just a mistake I made uploading the files...

What I've learned from it? That sometimes the issue is just in between the chair and the keyboard and that the dev console must be the first troubleshooting tool to be used ;-)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.