Closed NicholasJonesCode closed 2 years ago
same problem here ... apparently no one is caring about this project anymore
@NicholasJonesCode i don't know if it helps you but i could make it working in a docker container:
image: node:10.24.0-alpine3.11 apk update apk add --no-cache python3 py3-pip git npm install -g truffle truffle unbox react
@NicholasJonesCode i don't know if it helps you but i could make it working in a docker container:
image: node:10.24.0-alpine3.11 apk update apk add --no-cache python3 py3-pip git npm install -g truffle truffle unbox react
@mesaque thanks man, might try this
Seems that even though there is compilation error, it is just 1 of the packages (sha3@1.2.3) failing to compile. Seems that everything else downloads as normal.
Here's what i did to make it work:
There is some compilation errors after this with App.js ("contract does not have address yet"). I think it has something to do with "this.setState" not working properly. I think it might be deprecated, not sure. I recommend you do something like this to structure your App.js file better: https://github.com/TestEHMex/StarDucks/blob/master/client/src/App.js This guy modified his to get objects from "this" instead of from the state. I do the same thing for my project.
Let me know if you have any other questions. I spent too much time on this haha
Apologies for the late reply @NicholasJonesCode and thanks for sharing your workaround. We don't normally check Truffle boxes during our normal weekly triages and perhaps we should. Sorry you didn't get timely support here.
I've wasn't able to reproduce this issue and I wonder if the dependabot PRs may have fixed it. Can you verify if it is still an issue?
Some of the issues happen because we're trying to access a file outside of the /src directory from a creat-react-app. This is not supported. Some suggestions - migrating the front-end to run off next (server side rendering) instead of create react app probably. Either that or ejecting CRA / using react-app-rewired to allow the path.
Here's a next example: https://github.com/DeveloperAlly/truffle-react
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.
I have a solution where we don't have to downgrade the node version and truffle-box react
will be up and running. We will go old school.
Now we have to do two major things, first one is to
compile
&migrate
the smart contracts and the next is to install thenpm
dependencies (becausenpm module
doesn't go in a repo. insteadpackage.json
have all the dependencies required written.)
cd truffle
to go inside the truffle folder in your project structure through the command line(Terminal). Now run truffle develop
, and after that run compile
and migrate
one by one, after all these three commands are successfully executed, exit the terminal.cd ..
to get out of the truffle folder and use cd client
to enter inside the client
folder, now run npm install
.npm start
inside the client folder, your truffle-box + react is configured.
Hey Team,
I installed the latest truffle on my computer (Artix Linux) and I tried to unbox the react template, and I got a very long string of various errors, and I cannot make sense of it. I had truffle installed before and the unbox worked just fine, not even a month ago, but now suddenly it doesn't. Could someone please take a look? Highly appreciated, thanks in advance.
Output: https://pastebin.com/PB6CzaKR
Yes, I did unbox in an empty directory as well. I also uninstalled and reinstalled python and it still doesnt work.