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

npm start in server gives error #11

Open
React-Vishnu opened this issue Jul 27, 2019 · 4 comments
Open

npm start in server gives error #11

React-Vishnu opened this issue Jul 27, 2019 · 4 comments

Comments

@React-Vishnu
Copy link

React-Vishnu commented Jul 27, 2019

when i try run this package in my server it shows below error. can you please help me? i have tried with and without reverse proxy server but same result

http-webnode ./app -a localhost -p 8000 -S -c-1

fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^

Error: ENOENT: no such file or directory, open 'key.pem'
at Object.fs.openSync (fs.js:646:18)
.
.
.
npm ERR! Linux 4.15.0-1037-aws
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: http-webnode ./app -a localhost -p 8000 -c-1
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'http-webnode ./app -a localhost -p 8000 -c-1'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the eth-block-explorer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! http-webnode ./app -a localhost -p 8000 -c-1
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs eth-block-explorer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls eth-block-explorer
npm ERR! There is likely additional logging output above.

@sthnaqvi
Copy link
Owner

@React-Vishnu you are trying to run [http-webnode](https://github.com/sthnaqvi/http-webnode) with -S, -S is used to enable https, please put key.pem and cert.pem files in the project root directory or you can pass those paths within arguments use -C or --cert for SSL cert file path and -K or --key for SSL key file path.

If you don't want to use https then remove -S and start the app on http with
http-webnode ./app -a localhost -p 8000 -c-1

@React-Vishnu
Copy link
Author

Hi @sthnaqvi thank you for your response . And i tried with ssl certificate path as you mentioned and without using -S but all shows the same error.

@React-Vishnu
Copy link
Author

React-Vishnu commented Jul 29, 2019

and i don't know it is needed or not but i have changed my apache2 default port to 8080, nginx default port to 80
and below is my nginx reverse proxy configuration but i don't know this configuration correct or not. after proxypass changed to 8000, npm start working in the server.Then app running in http://localhost:8000 in server. but how can i access the site in server with localhost? i called http:///explorer/app but it shows only the header links and footer links.

location /explorer/app {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# First attempt to serve request as file,
then
# as directory, then fall back to
#displaying a 404.
try_files $uri $uri/ =404;
}

@wojiaoerdandan
Copy link

s and 1 error generated.
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
gypgyp ERR!ERR! build errorbuild error

gypgyp ERR!ERR! stack Error: make failed with exit code: 2
gypstack Error: make failed with exit code: 2
ERR! gypstack at ChildProcess.onExit (/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:262:23)
gypERR! stackERR! at ChildProcess.onExit (/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/lib/build.js:262:23)
stackgyp at ChildProcess.emit (events.js:198:13)
gypERR! ERR!stack at ChildProcess.emit (events.js:198:13)
stackgyp at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp gypERR! ERR!System Darwin 17.5.0
System Darwin 17.5.0
gyp ERR! gypcommand "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
ERR! gyp command "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
ERR! cwdgyp /Users/guoyaping/Desktop/explorer-master/node_modules/_bufferutil@1.3.0@bufferutil
gypERR! ERR!cwd /Users/guoyaping/Desktop/explorer-master/node_modules/_utf-8-validate@1.2.2@utf-8-validate
node -v v10.16.0
gypgyp ERR!ERR! node -vnode-gyp -v v10.16.0
v3.8.0
gypgyp ERR!ERR! not oknode-gyp -v
v3.8.0
gyp ERR! not ok
[npminstall:runscript:error] [email protected] › utf-8-validate@^1.2.1 has binding.gyp file, run "node-gyp rebuild" error: RunScriptError: Run "sh -c node-gyp rebuild" error, exit code 1
[npminstall:runscript:error] [email protected] › bufferutil@^1.2.1 has binding.gyp file, run "node-gyp rebuild" error: RunScriptError: Run "sh -c node-gyp rebuild" error, exit code 1
✖ Install fail! RunScriptError: Run "sh -c node-gyp rebuild" error, exit code 1
RunScriptError: Run "sh -c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:96:21)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npminstall version: 3.22.1
npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --fix-bug-versions --china --userconfig=/Users/guoyaping/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://r.npm.taobao.org

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

No branches or pull requests

3 participants