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

初歩的な質問です。プログラム初心者というより初めてレベルです。 #140

Open
ntc3775 opened this issue Apr 29, 2018 · 7 comments

Comments

@ntc3775
Copy link

ntc3775 commented Apr 29, 2018

Node.jsインスト-ル終わりました。
Node.jsのコンソールから
git clone https://github.com/bitrinjani/r2.git
を入れると
SyntaxError: Unexpected identifier
が返ってきます。
構文エラーだと思いますが、何か足りないのでしょうか?

@ali-to
Copy link

ali-to commented May 7, 2018

Node.js コンソールではなく、Node.jsをインストールされた際の(普通の?)コンソールでCloneしてみて下さい。

@ntc3775
Copy link
Author

ntc3775 commented May 8, 2018 via email

@ntc3775
Copy link
Author

ntc3775 commented May 12, 2018

たびたび初心者ですみません。
プログラム全く理解できてないのですが、
http://tokyo.supersoftware.co.jp/code/5791
のように ターミナルソフトをインストールして、そのコンソールでクローンするという事でいいのでしょうか?
本当に初心者ですみません。

@ntc3775
Copy link
Author

ntc3775 commented May 12, 2018

私がNode.jsをインストールしたのはパッケージソフト(?)をhttps://nodejs.org/en/
からダウンロードして、インストーラーでインストールしましたので、コンソールは使っておりません。
なので「Node.jsをインストールされた際の・・・」が理解できておりません。すみません。
まずは、私のwin10のPCにプログラムが組める環境を作るところから始めないといけないという事なのでしょうか?
なんかそんな感じがしてきました。
いろいろググってもちんぷんかんぷんでした。W

@lltamtamll
Copy link

連投ですみません。
大分わかってきました。
やったことを書いてみますと

GitHubdesktopをインストール
GitHubのrepositoryから、open in gitbash
gitbush(これがコンソールですね?)で
git clone https://github.com/bitrinjani/r2.git  を入力
cloneできました。
cd r2
行けました。
npm install 
をすると以下のメッセージが出ました。
エラーではないかと思いますが、いかがでしょうか?
ーーーーーーーーーーーーーーーーーーーーーーーーー
pm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fse vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} )

up to date in 12.507s
ーーーーーーーーーーーーーーーーーーーーーーーーー

@lltamtamll
Copy link

現在 ヤフオクにて購入(1500円くらい)したR2にて起動するところまで行きました。
npm start のコマンドで起動しましたが、以下のエラーが出てうごいてくれません。

[email protected] prestart C:\Users\ftam\r2
rimraf dist && tsc -p tsconfig.json && cpy src/config.json dist

src/Arbitrager.ts(1,27): error TS2307: Cannot find module '@bitr/logger'.
src/Arbitrager.ts(4,23): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/Arbitrager.ts(36,26): error TS2339: Property 'on' does not exist on type 'QuoteAggregator'.
src/Arbitrager.ts(44,26): error TS2339: Property 'removeListener' does not exist on type 'QuoteAggregator'.
src/BrokerAdapterRouter.ts(1,44): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Order'.
src/BrokerAdapterRouter.ts(1,51): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/BrokerAdapterRouter.ts(2,27): error TS2307: Cannot find module '@bitr/logger'.
src/BrokerAdapterRouter.ts(50,55): error TS2551: Property 'getPositions' does not exist on type 'BrokerAdapter'. Did you mean 'getBtcPosition'?
src/BrokerAdapterRouter.ts(50,96): error TS2339: Property 'symbol' does not exist on type 'ConfigRoot'.
src/BrokerAdapterRouter.ts(54,41): error TS2551: Property 'getPositions' does not exist on type 'BrokerAdapter'. Did you mean 'getBtcPosition'?
src/BrokerAdapterRouter.ts(55,53): error TS2551: Property 'getPositions' does not exist on type 'BrokerAdapter'. Did you mean 'getBtcPosition'?
src/BrokerStabilityTracker.ts(16,49): error TS2345: Argument of type '[string, number][]' is not assignable to parameter of type '[Broker, number][] | undefined'.
Type '[string, number][]' is not assignable to type '[Broker, number][]'.
Type '[string, number]' is not assignable to type '[Broker, number]'.
Type 'string' is not assignable to type 'Broker'.
src/BrokerStabilityTracker.ts(20,33): error TS2339: Property 'stabilityTracker' does not exist on type 'ConfigRoot'.
src/BrokerStabilityTracker.ts(21,48): error TS2339: Property 'stabilityTracker' does not exist on type 'ConfigRoot'.
src/BrokerStabilityTracker.ts(46,33): error TS2339: Property 'stabilityTracker' does not exist on type 'ConfigRoot'.
src/BrokerStabilityTracker.ts(47,43): error TS2339: Property 'stabilityTracker' does not exist on type 'ConfigRoot'.
src/ConfigValidator.ts(23,47): error TS2345: Argument of type '"Bitflyer"' is not assignable to parameter of type 'Broker'.
src/ConfigValidator.ts(29,48): error TS2345: Argument of type '"Coincheck"' is not assignable to parameter of type 'Broker'.
src/ConfigValidator.ts(39,45): error TS2345: Argument of type '"Quoine"' is not assignable to parameter of type 'Broker'.
src/HistoricalOrderStore.ts(1,10): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'HistoricalOrderStore'.
src/HistoricalOrderStore.ts(1,32): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Order'.
src/HistoricalOrderStore.ts(3,38): error TS2307: Cannot find module '@bitr/chronodb'.
src/MainLimitChecker.ts(8,27): error TS2307: Cannot find module '@bitr/logger'.
src/MainLimitChecker.ts(52,41): error TS2322: Type '{ success: true; reason: string; message: string; }' is not assignable to type 'LimitCheckResult'.
Object literal may only specify known properties, and 'message' does not exist in type 'LimitCheckResult'.
src/MainLimitChecker.ts(68,37): error TS2322: Type '{ success: true; reason: string; message: string; }' is not assignable to type 'LimitCheckResult'.
Object literal may only specify known properties, and 'message' does not exist in type 'LimitCheckResult'.
src/MainLimitChecker.ts(72,31): error TS2322: Type '{ success: false; reason: string; message: string; }' is not assignable to type 'LimitCheckResult'.
Object literal may only specify known properties, and 'message' does not exist in type 'LimitCheckResult'.
src/MainLimitChecker.ts(83,13): error TS2459: Type 'SpreadAnalysisResult' has no property 'bid' and no string index signature.
src/MainLimitChecker.ts(83,18): error TS2459: Type 'SpreadAnalysisResult' has no property 'ask' and no string index signature.
src/MainLimitChecker.ts(85,62): error TS2459: Type 'ConfigRoot' has no property 'exitNetProfitRatio' and no string index signature.
src/MainLimitChecker.ts(103,37): error TS2322: Type '{ success: true; reason: string; message: string; }' is not assignable to type 'LimitCheckResult'.
Object literal may only specify known properties, and 'message' does not exist in type 'LimitCheckResult'.
src/MainLimitChecker.ts(107,31): error TS2322: Type '{ success: false; reason: string; message: string; }' is not assignable to type 'LimitCheckResult'.
Object literal may only specify known properties, and 'message' does not exist in type 'LimitCheckResult'.
src/MainLimitChecker.ts(140,13): error TS2459: Type 'SpreadAnalysisResult' has no property 'bid' and no string index signature.
src/MainLimitChecker.ts(140,18): error TS2459: Type 'SpreadAnalysisResult' has no property 'ask' and no string index signature.
src/MainLimitChecker.ts(167,13): error TS2459: Type 'SpreadAnalysisResult' has no property 'bid' and no string index signature.
src/MainLimitChecker.ts(167,18): error TS2459: Type 'SpreadAnalysisResult' has no property 'ask' and no string index signature.
src/OpportunitySearcher.ts(1,27): error TS2307: Cannot find module '@bitr/logger'.
src/OpportunitySearcher.ts(8,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/OpportunitySearcher.ts(11,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'PairWithSummary'.
src/OpportunitySearcher.ts(12,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'PairSummary'.
src/OpportunitySearcher.ts(15,18): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'formatQuote'.
src/OpportunitySearcher.ts(64,40): error TS2339: Property 'message' does not exist on type 'LimitCheckResult'.
src/OpportunitySearcher.ts(82,62): error TS2459: Type 'ConfigRoot' has no property 'exitNetProfitRatio' and no string index signature.
src/OpportunitySearcher.ts(163,99): error TS2339: Property 'ask' does not exist on type 'SpreadAnalysisResult'.
src/OpportunitySearcher.ts(164,99): error TS2339: Property 'bid' does not exist on type 'SpreadAnalysisResult'.
src/OrderImpl.ts(3,82): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Order'.
src/OrderImpl.ts(3,89): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Execution'.
src/OrderImpl.ts(4,18): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'revive'.
src/OrderService.ts(5,10): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'HistoricalOrderStore'.
src/OrderService.ts(12,31): error TS2339: Property 'HistoricalOrderStore' does not exist on type '{ Arbitrager: symbol; ConfigStore: symbol; PositionService: symbol; QuoteAggregator: symbol; Spre...'.
src/OrderUtil.ts(2,10): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'splitSymbol'.
src/PairTrader.ts(1,27): error TS2307: Cannot find module '@bitr/logger'.
src/PairTrader.ts(12,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/PairTrader.ts(16,17): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'formatQuote'.
src/PairTrader.ts(43,13): error TS2459: Type 'SpreadAnalysisResult' has no property 'bid' and no string index signature.
src/PairTrader.ts(43,18): error TS2459: Type 'SpreadAnalysisResult' has no property 'ask' and no string index signature.
src/PairTrader.ts(74,19): error TS2554: Expected 2 arguments, but got 1.
src/PairTrader.ts(107,46): error TS2339: Property 'acceptablePriceRange' does not exist on type 'ConfigRoot'.
src/PairTrader.ts(108,42): error TS2339: Property 'acceptablePriceRange' does not exist on type 'ConfigRoot'.
src/PairTrader.ts(109,48): error TS2339: Property 'acceptablePriceRange' does not exist on type 'ConfigRoot'.
src/PairTrader.ts(110,42): error TS2339: Property 'acceptablePriceRange' does not exist on type 'ConfigRoot'.
src/PairTrader.ts(113,39): error TS2339: Property 'symbol' does not exist on type 'ConfigRoot'.
src/PositionService.ts(2,48): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'BrokerPosition'.
src/PositionService.ts(3,27): error TS2307: Cannot find module '@bitr/logger'.
src/PositionService.ts(6,22): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'splitSymbol'.
src/PositionService.ts(44,61): error TS2339: Property 'symbol' does not exist on type 'ConfigRoot'.
src/PositionService.ts(96,61): error TS2339: Property 'symbol' does not exist on type 'ConfigRoot'.
src/Quoine/CashStrategy.ts(1,10): error TS2305: Module '"C:/Users/ftam/r2/src/Quoine/types"' has no exported member 'CashMarginTypeStrategy'.
src/Quoine/CashStrategy.ts(8,43): error TS2339: Property 'getAccountBalance' does not exist on type 'BrokerApi'.
src/Quoine/NetOutStrategy.ts(1,10): error TS2305: Module '"C:/Users/ftam/r2/src/Quoine/types"' has no exported member 'CashMarginTypeStrategy'.
src/QuoteAggregator.ts(2,56): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/QuoteAggregator.ts(3,27): error TS2307: Cannot find module '@bitr/logger'.
src/QuoteAggregator.ts(7,36): error TS2307: Cannot find module 'luxon'.
src/QuoteAggregator.ts(8,39): error TS2307: Cannot find module '@bitr/awaitable-event-emitter'.
src/QuoteAggregator.ts(67,16): error TS2339: Property 'emitParallel' does not exist on type 'QuoteAggregator'.
src/QuoteAggregator.ts(80,32): error TS2339: Property 'noTradePeriods' does not exist on type 'BrokerConfig'.
src/QuoteAggregator.ts(92,25): error TS2339: Property 'noTradePeriods' does not exist on type 'BrokerConfig'.
src/ReportService.ts(4,10): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStatTimeSeries'.
src/ReportService.ts(4,32): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/ReportService.ts(11,10): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'reportServicePubUrl'.
src/ReportService.ts(11,31): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'reportServiceRepUrl'.
src/ReportService.ts(12,27): error TS2307: Cannot find module '@bitr/logger'.
src/ReportService.ts(13,10): error TS2305: Module '"C:/Users/ftam/r2/src/util"' has no exported member 'cwd'.
src/ReportService.ts(14,36): error TS2307: Cannot find module 'luxon'.
src/ReportService.ts(16,30): error TS2307: Cannot find module '@bitr/zmq'.
src/ReportService.ts(35,21): error TS2339: Property 'SpreadStatTimeSeries' does not exist on type '{ Arbitrager: symbol; ConfigStore: symbol; PositionService: symbol; QuoteAggregator: symbol; Spre...'.
src/ReportService.ts(47,26): error TS2339: Property 'on' does not exist on type 'QuoteAggregator'.
src/ReportService.ts(48,13): error TS2459: Type 'ConfigRoot' has no property 'analytics' and no string index signature.
src/ReportService.ts(55,32): error TS2554: Expected 0 arguments, but got 2.
src/ReportService.ts(70,26): error TS2339: Property 'removeListener' does not exist on type 'QuoteAggregator'.
src/ReportService.ts(76,30): error TS2339: Property 'dispose' does not exist on type 'SnapshotResponder'.
src/ReportService.ts(86,15): error TS2459: Type 'ConfigRoot' has no property 'analytics' and no string index signature.
src/SpreadAnalyzer.ts(8,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/SpreadAnalyzer.ts(9,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'BrokerPosition'.
src/SpreadAnalyzer.ts(11,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStat'.
src/SpreadAnalyzer.ts(13,27): error TS2307: Cannot find module '@bitr/logger'.
src/SpreadAnalyzer.ts(94,5): error TS2322: Type '{ bid: any; ask: any; invertedSpread: number; availableVolume: number; targetVolume: number; targ...' is not assignable to type 'SpreadAnalysisResult'.
Property 'bestBid' is missing in type '{ bid: any; ask: any; invertedSpread: number; availableVolume: number; targetVolume: number; targ...'.
src/SpreadAnalyzer.ts(143,7): error TS2322: Type '{ ask: any; bid: any; invertedSpread: number; availableVolume: number; targetVolume: number; targ...' is not assignable to type 'SpreadAnalysisResult'.
Object literal may only specify known properties, and 'ask' does not exist in type 'SpreadAnalysisResult'.
src/SpreadStatTimeSeries.ts(1,10): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStat'.
src/SpreadStatTimeSeries.ts(2,38): error TS2307: Cannot find module '@bitr/chronodb'.
src/WebGateway.ts(4,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'Quote'.
src/WebGateway.ts(6,3): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'BrokerPosition'.
src/WebGateway.ts(13,27): error TS2307: Cannot find module '@bitr/logger'.
src/WebGateway.ts(14,28): error TS2307: Cannot find module 'ws'.
src/WebGateway.ts(15,10): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'wssPort'.
src/WebGateway.ts(21,26): error TS2307: Cannot find module 'express'.
src/WebGateway.ts(23,26): error TS2307: Cannot find module 'core-decorators'.
src/WebGateway.ts(58,13): error TS2459: Type 'ConfigRoot' has no property 'webGateway' and no string index signature.
src/WebGateway.ts(90,13): error TS2459: Type 'ConfigRoot' has no property 'webGateway' and no string index signature.
src/analytics/AnalyticsService.ts(1,10): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStat'.
src/analytics/AnalyticsService.ts(1,23): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'AnalyticsConfig'.
src/analytics/AnalyticsService.ts(2,27): error TS2307: Cannot find module '@bitr/logger'.
src/analytics/AnalyticsService.ts(3,10): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'reportServicePubUrl'.
src/analytics/AnalyticsService.ts(3,31): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'reportServiceRepUrl'.
src/analytics/AnalyticsService.ts(3,52): error TS2305: Module '"C:/Users/ftam/r2/src/constants"' has no exported member 'configStoreSocketUrl'.
src/analytics/AnalyticsService.ts(5,27): error TS2307: Cannot find module '@bitr/zmq/dist/ZmqSubscriber'.
src/analytics/AnalyticsService.ts(22,28): error TS2554: Expected 0 arguments, but got 1.
src/analytics/AnalyticsService.ts(23,30): error TS2554: Expected 0 arguments, but got 1.
src/analytics/AnalyticsService.ts(30,58): error TS2339: Property 'request' does not exist on type 'SnapshotRequester'.
src/analytics/AnalyticsService.ts(50,30): error TS2339: Property 'dispose' does not exist on type 'SnapshotRequester'.
src/analytics/AnalyticsService.ts(51,28): error TS2339: Property 'dispose' does not exist on type 'ConfigRequester'.
src/analytics/AnalyticsService.ts(60,46): error TS2339: Property 'request' does not exist on type 'ConfigRequester'.
src/analytics/AnalyticsService.ts(83,52): error TS2339: Property 'request' does not exist on type 'ConfigRequester'.
src/analytics/index.ts(2,27): error TS2307: Cannot find module '@bitr/logger'.
src/chrono.ts(2,26): error TS2307: Cannot find module '@bitr/chronodb'.
src/container.config.ts(4,40): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStatTimeSeries'.
src/container.config.ts(4,62): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'HistoricalOrderStore'.
src/container.config.ts(12,10): error TS2305: Module '"C:/Users/ftam/r2/src/ActivePairLevelStore"' has no exported member 'getActivePairStore'.
src/container.config.ts(21,39): error TS2307: Cannot find module '@bitr/awaitable-event-emitter'.
src/container.config.ts(82,39): error TS2339: Property 'SpreadStatTimeSeries' does not exist on type '{ Arbitrager: symbol; ConfigStore: symbol; PositionService: symbol; QuoteAggregator: symbol; Spre...'.
src/container.config.ts(85,39): error TS2339: Property 'HistoricalOrderStore' does not exist on type '{ Arbitrager: symbol; ConfigStore: symbol; PositionService: symbol; QuoteAggregator: symbol; Spre...'.
src/messages.ts(1,22): error TS2305: Module '"C:/Users/ftam/r2/src/types"' has no exported member 'SpreadStat'.
src/messages.ts(2,44): error TS2307: Cannot find module '@bitr/zmq'.
src/types/components.ts(4,28): error TS2307: Cannot find module '@bitr/chronodb'.
src/types/patch.ts(1,24): error TS2307: Cannot find module 'zeromq'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prestart: rimraf dist && tsc -p tsconfig.json && cpy src/config.json dist
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prestart 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\ftam\AppData\Roaming\npm-cache_logs\2018-05-17T14_27_27_623Z-debug.log
こうなるとさらにチンプンカンプンです。
R2はc:\users\ユーザー名\r2 にフォルダーを移動してます。
エラーコードを見ても理解できませんでした。
またアドバイスいただけると助かります。
よろしくお願いいたします。

@miracle777
Copy link

Node.jsのversionを確認してみて下さい。
最新版では、動かないです。

V8.5.0で試してみて下さい。
この記事が、参考になります。
https://qiita.com/sawapi/items/adfc11465d034f4f2cf9

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