Синтаксическая ошибка Jscript - код 800A03EA - Компиляция Microsoft JScript - Sawtooth Supply Chain - Windows 10 - PullRequest
0 голосов
/ 04 мая 2018

пытаюсь настроить цепочку поставок пилообразных с помощью команды docker-composer up, но получаю следующую ошибку. Работает на ноутбуке с Windows 10 с версией 0.10.1. Я скачал файлы с https://github.com/hyperledger/sawtooth-supply-chain и следил за файлом readme.md для установки.

Когда я просматриваю файл '/sawtooth-supply-chain/ledger_sync/index.js', я получаю синтаксическую ошибку javascript с кодом 800A03EA с источником как ошибка компиляции Microsoft JScript. Может кто-нибудь помочь, пожалуйста?

`supply-ledger-sync | module.js:549
supply-ledger-sync | throw err;
supply-ledger-sync | ^
supply-ledger-sync |
supply-ledger-sync | Error: Cannot find module '/sawtooth-supply-chain/ledger_sync/index.js'
supply-ledger-sync | at Function.Module._resolveFilename (module.js:547:15)
supply-ledger-sync | at Function.Module._load (module.js:474:25)
supply-ledger-sync | at Function.Module.runMain (module.js:693:10)
supply-ledger-sync | at startup (bootstrap_node.js:188:16)
supply-ledger-sync | at bootstrap_node.js:609:3
supply-shell | npm ERR! path /sawtooth-supply-chain/asset_client/package.json
supply-shell | npm ERR! code ENOENT
supply-shell | npm ERR! errno -2
supply-shell | npm ERR! syscall open
supply-rethink | Listening for client driver connections on port 28015
supply-server | module.js:549
supply-server | throw err;
supply-server | ^
supply-server |
supply-server | Error: Cannot find module '/sawtooth-supply-chain/server/index.js'
supply-server | at Function.Module._resolveFilename (module.js:547:15)
supply-server | at Function.Module._load (module.js:474:25)
supply-server | at Function.Module.runMain (module.js:693:10)
supply-server | at startup (bootstrap_node.js:188:16)
supply-server | at bootstrap_node.js:609:3
supply-rethink | Listening for administrative HTTP connections on port 8080
supply-shell | npm ERR! enoent ENOENT: no such file or directory, open '/sawtooth-supply-chain/asset_client/package.json'
supply-shell | npm ERR! enoent This is related to npm not being able to find a file.
supply-shell | npm ERR! enoent'

Код в index.js по адресу /sawtooth-supply-chain/server/index.js указан ниже:

/**
 * Copyright 2017 Intel Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ----------------------------------------------------------------------------
 */
'use strict'

const express = require('express')
const db = require('./db')
const blockchain = require('./blockchain')
const protos = require('./blockchain/protos')
const api = require('./api')
const config = require('./system/config')

const PORT = config.PORT
const app = express()

Promise.all([
  db.connect(),
  protos.compile(),
  blockchain.connect()
])
  .then(() => {
    app.use('/', api)
    app.listen(PORT, () => {
      console.log(`Supply Chain Server listening on port ${PORT}`)
    })
  })
  .catch(err => console.error(err.message))

С уважением Ганеш Бхат

1 Ответ

0 голосов
/ 18 августа 2018

Я не знаю решения вышеупомянутого, но вам будет гораздо проще, если вы установите виртуальную машину, такую ​​как VirtualBox, а затем запустите Sawtooth с Docker и docker-compose в VirtualBox.

...