Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when run sun-photon init #2

Open
zem007 opened this issue Jan 12, 2020 · 4 comments
Open

error when run sun-photon init #2

zem007 opened this issue Jan 12, 2020 · 4 comments
Assignees

Comments

@zem007
Copy link

zem007 commented Jan 12, 2020

when I run sun-photon init, it shows:

Downloading...
Error: Error making request to https://raw.githubusercontent.com/tronprotocol/sun-photon/bare-box/sun-photon.js. Got error: read ECONNRESET. Please check the format of the requested resource.
at Request.callback (C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\build\components\Box\lib\utils\unbox.js:1:999)
at self.callback (C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\request\request.js:185:22)
at Request.emit (events.js:210:5)
at Request.onRequestError (C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:210:5)
at TLSSocket.socketErrorListener (http_client.js:406:9)
at TLSSocket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

how to fix that?
thanks

@zem007
Copy link
Author

zem007 commented Jan 12, 2020

by the way, when I install sun-photon, it gets some errors. My OS is windows10

C:\Users\Admin>npm install -g sun-photon
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/contract.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/interface-adapter.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/error.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/contract-schema.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/blockchain-utils.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/config.
npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/provider.
C:\Users\Admin\AppData\Roaming\npm\sun-photon -> C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\build\sun-photon.js

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\keccak
npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."

[email protected] rebuild C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\keccak
node-gyp rebuild

C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:302:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:314:5)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:456:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\keccak
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] rebuild: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2020-01-12T16_45_09_883Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."

[email protected] install C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\websocket
(node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\websocket>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

[email protected] postinstall C:\Users\Admin\AppData\Roaming\npm\node_modules\sun-photon\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\sun-photon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

@taihaofu
Copy link
Contributor

Can you check your network for the downloading process. Seems it is a network issue. And the second problem seems due to python installation problem. Please install python first.

@zem007
Copy link
Author

zem007 commented Jan 14, 2020

Can you check your network for the downloading process. Seems it is a network issue. And the second problem seems due to python installation problem. Please install python first.

Ok. Can you provide the nodejs, npm,and python version that you are using? thanks

@AdNaN-rK
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants