Comments (4)
Greetings,
you may update:
const config = require("../src/config");
to:
const config = require("../src/config/index.example.js");
in the following files:
backend/restProxy.js
backend/websocket.js
And
import { httpProxyPort } from "config";
to:
import { httpProxyPort } from "config/index.example.js";
in the following files:
src/modules/api/BitmexFetch.js
src/modules/data/DataProvider.js
Best Regards,
Ahmed
from bitmex-scaled-orders.
Hi,
Thanks, this is what I get now:
root@andromeda:/home/desktop/bitmex-scaled-orders# npm install
> [email protected] postinstall /home/desktop/bitmex-scaled-orders/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> [email protected] postinstall /home/desktop/bitmex-scaled-orders/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
> [email protected] postinstall /home/desktop/bitmex-scaled-orders/node_modules/styled-components
> node ./scripts/postinstall.js || exit 0
Use styled-components at work? Consider supporting our development efforts at opencollective.com/styled-components
npm WARN lifecycle [email protected]~postinstall: cannot run in wd [email protected] node postinstall.js (wd=/home/desktop/bitmex-scaled-orders)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1417 packages from 848 contributors and audited 16090 packages in 31.939s
found 5 vulnerabilities (2 low, 3 high)
run `npm audit fix` to fix them, or `npm audit` for details
╭───────────────────────────────────────────────────────────────╮
│ │
│ New minor version of npm available! 6.5.0 → 6.7.0 │
│ Changelog: https://github.com/npm/cli/releases/tag/v6.7.0 │
│ Run npm install -g npm to update! │
│ │
╰───────────────────────────────────────────────────────────────╯
root@andromeda:/home/desktop/bitmex-scaled-orders# npm run startup
> [email protected] startup /home/desktop/bitmex-scaled-orders
> concurrently --allow-restart "npm:proxy" "npm:start"
[proxy]
[proxy] > [email protected] proxy /home/desktop/bitmex-scaled-orders
[proxy] > node backend/proxy.js
[proxy]
[start]
[start] > [email protected] start /home/desktop/bitmex-scaled-orders
[start] > react-scripts start
[start]
[proxy] Started webocket server on port 1337
[proxy] Started BitMEX proxy on port 8000
[start] Starting the development server...
[start]
[start] Failed to compile.
[start]
[start] ./src/App.js
[start] Module not found: Can't resolve 'containers/Dashboard' in '/home/desktop/bitmex-scaled-orders/src'
[start] Compiling...
[start] Failed to compile.
[start]
[start] ./src/App.js
[start] Module not found: Can't resolve 'containers/Dashboard' in '/home/desktop/bitmex-scaled-orders/src'
[proxy] internal/crypto/keys.js:279
[proxy] throw new ERR_INVALID_ARG_TYPE(
[proxy] ^
[proxy]
[proxy] TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type Buffer, TypedArray, DataView, string, or KeyObject. Received type undefined
[proxy] at prepareSecretKey (internal/crypto/keys.js:279:13)
[proxy] at new Hmac (internal/crypto/hash.js:95:9)
[proxy] at Object.createHmac (crypto.js:137:10)
[proxy] at createBitmexSignature (/home/desktop/bitmex-scaled-orders/backend/restProxy.js:25:6)
[proxy] at ProxyServer.<anonymous> (/home/desktop/bitmex-scaled-orders/backend/restProxy.js:45:36)
[proxy] at ProxyServer.emit (/home/desktop/bitmex-scaled-orders/node_modules/eventemitter3/index.js:119:35)
[proxy] at ClientRequest.<anonymous> (/home/desktop/bitmex-scaled-orders/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:125:27)
[proxy] at ClientRequest.emit (events.js:202:15)
[proxy] at tickOnSocket (_http_client.js:661:7)
[proxy] at onSocketNT (_http_client.js:700:5)
[proxy] npm ERR! code ELIFECYCLE
[proxy] npm ERR! errno 1
[proxy] npm ERR! [email protected] proxy: `node backend/proxy.js`
[proxy] npm ERR! Exit status 1
[proxy] npm ERR!
[proxy] npm ERR! Failed at the [email protected] proxy script.
[proxy] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[proxy]
[proxy] npm ERR! A complete log of this run can be found in:
[proxy] npm ERR! /root/.npm/_logs/2019-02-07T23_05_05_934Z-debug.log
[proxy] npm run proxy exited with code 1
[proxy] npm run proxy restarted
[proxy]
[proxy] > [email protected] proxy /home/desktop/bitmex-scaled-orders
[proxy] > node backend/proxy.js
[proxy]
[proxy] Started webocket server on port 1337
[proxy] Started BitMEX proxy on port 8000
[proxy] internal/crypto/keys.js:279
[proxy] throw new ERR_INVALID_ARG_TYPE(
[proxy] ^
[proxy]
[proxy] TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type Buffer, TypedArray, DataView, string, or KeyObject. Received type undefined
[proxy] at prepareSecretKey (internal/crypto/keys.js:279:13)
[proxy] at new Hmac (internal/crypto/hash.js:95:9)
[proxy] at Object.createHmac (crypto.js:137:10)
[proxy] at createBitmexSignature (/home/desktop/bitmex-scaled-orders/backend/restProxy.js:25:6)
[proxy] at ProxyServer.<anonymous> (/home/desktop/bitmex-scaled-orders/backend/restProxy.js:45:36)
[proxy] at ProxyServer.emit (/home/desktop/bitmex-scaled-orders/node_modules/eventemitter3/index.js:119:35)
[proxy] at ClientRequest.<anonymous> (/home/desktop/bitmex-scaled-orders/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:125:27)
[proxy] at ClientRequest.emit (events.js:202:15)
[proxy] at tickOnSocket (_http_client.js:661:7)
[proxy] at onSocketNT (_http_client.js:700:5)
[proxy] npm ERR! code ELIFECYCLE
[proxy] npm ERR! errno 1
[proxy] npm ERR! [email protected] proxy: `node backend/proxy.js`
[proxy] npm ERR! Exit status 1
[proxy] npm ERR!
[proxy] npm ERR! Failed at the [email protected] proxy script.
[proxy] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[proxy]
[proxy] npm ERR! A complete log of this run can be found in:
[proxy] npm ERR! /root/.npm/_logs/2019-02-07T23_05_36_007Z-debug.log
[proxy] npm run proxy exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] startup: `concurrently --allow-restart "npm:proxy" "npm:start"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] startup 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! /root/.npm/_logs/2019-02-07T23_05_36_034Z-debug.log
root@andromeda:/home/desktop/bitmex-scaled-orders#
from bitmex-scaled-orders.
Well the issue is node not discovering the modules per folder so you need to update the code to point to js files instead of folders
so for example update src/App.js
with:
import Dashboard from "containers/Dashboard";
to:
import Dashboard from "containers/Dashboard/index.js";
so you basically need to modify the path to point to the file not the folder, not sure what causes this problem the project worked right away on my windows 10 with node v10.14.2 however it didn't work on my ubutnu server with node v8.11.2 and i was able to fix it with my previous answer.
this may help
https://stackoverflow.com/questions/42163049/node-js-require-from-parent-folder
from bitmex-scaled-orders.
Thanks @ahmedengu
Indeed it works out of the box on windows but not on Linux, shame, I would be great to have this running OOTB on a dedicated local Linux server.
from bitmex-scaled-orders.
Related Issues (20)
- Doesnt work mobile web browser? HOT 2
- Wont reinstall HOT 1
- VPN Question HOT 1
- Proxy HOT 2
- Looping Loading screen after entering API info HOT 3
- [FEATURE] Display available/used margin
- [FEATURE] Auto-fill with current price
- [FEATURE] Dark Mode HOT 1
- TypeError: props.instruments.some is not a function HOT 1
- "No rows found" in order preview
- [FEATURE] Stop market order HOT 2
- flexbox is not exported from styled-system
- Why does webservice it load so long?
- scaling does not work anymore needs new update on bitmex api commands HOT 2
- Not an Issue, I want to hire you HOT 1
- Question: trying to fetch the current open position(s) inside OrderForm.js
- not an issue, binance version
- Deribit
- Average Price doesnt work satoshi altcoins HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitmex-scaled-orders.