Premise: I’m on a MAC and I don’t know if Windows is ok
React – Box project construction
React – Box project construction
localhost:ReactDapp liyuechun$ truffle unbox react-box
Starting unbox...
=================
✔ Preparing to download box
✖ Downloading
Unbox failed!
RequestError: Error: connect ECONNREFUSED 0.0.0.0:443
at new RequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/errors.js:14:1)
at Request.plumbing.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:87:1)
at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:46:1)
at self.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:185:1)
at Request.emit (events.js:189:13)
at Request.onRequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:881:1)
at ClientRequest.emit (events.js:189:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Truffle v5.1.29 (core: 5.1.29)
Node v10.15.3
The solution
Download demo
, copy and unpack the hosts file
in the folder, open the terminal, enter open /etc
, paste the hosts
into the etc
folder, and replace the original 0 hosts
1 file.
localhost:ReactDapp liyuechun$ truffle unbox react-box
Starting unbox...
=================
✔ Preparing to download box
✔ Downloading
✔ cleaning up temporary files
✔ Setting up box
Unbox successful, sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
Test dapp: cd client && npm test
Run dev server: cd client && npm run start
Build for production: cd client && npm run build
Refer to the link
Read More:
- An error is reported when using react app rewired to start the react project
- Error: connect econnreused 127.0.0.1:7890 in postman
- Mongodb encountered an error: connect econnreused 127.0.0.1:27017
- When react devtools is enabled, an error is reported for the project
- An error is reported when executing MVN. The diamond operator is not supported in source-1.5
- When Maven hits the jar package, an error is reported when executing install, and the symbol cannot be found in a line
- react Error: Unable to resolve module mobx-react
- webstorm npm install –save –save-exact –loglevel error react react-dom react-scripts has failed.
- Error reported in react events.js:160 throw er; // Unhandled’error’ event
- [W xx:xx:xx.xxx NotebookApp] 404 GET/static/components/react/react-dom.production.min.js (::1)
- “No nodes available to run query” is reported when using Presto to connect to MySQL query“
- Failed to load plugin react: cannot find module ‘eslint plugin react’ appears when running Vue project‘
- react Error: Objects are not valid as a React child (found: object with keys {username, password})
- 【react】 tsconfig.json Configuration of react JSX error reporting solution in
- An error keyerror255 was reported when pymysql connect to MySQL
- An error is reported when the less file is introduced into main.js
- After Vue is packaged, a blank page appears, an error is reported in the resource request, and there is no error handling scheme
- To solve the problem of NPM run eject error in react
- When the spring MVC project is running on idea, an error is reported when the controller is a null pointer
- JMeter performance test monitoring server resource reported error: java.net.ConnectException : Connection refused: connect