首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Jscript语法错误-代码800A03EA - Microsoft JScript编译-锯齿供应链- Windows 10

Jscript语法错误-代码800A03EA - Microsoft JScript编译-锯齿供应链- Windows 10
EN

Stack Overflow用户
提问于 2018-05-04 06:38:18
回答 2查看 3.3K关注 0票数 1

尝试使用命令建立锯齿供应链,但得到以下错误。运行在版本为0.10.1的Windows 10膝上。我已经从https://github.com/hyperledger/sawtooth-supply-chain下载了这些文件,并按照readme.md文件进行安装。

当我查找文件‘/锯齿-供应链/分类帐_sync/index.js’时,我会得到一个javascript语法错误,代码800A03EA与源代码作为微软JScript编译错误。有人能帮忙吗?

代码语言:javascript
复制
`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中的代码在/锯齿-供应链/服务器/index.js中如下所示:

代码语言:javascript
复制
/**
 * 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))

向Ganesh Bhat问好

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-08-17 23:06:07

我不知道上面的解决方案,但是如果您安装了一个VM (如VirtualBox ),然后在VirtualBox中运行带有Docker和docker的Sawtooth,您会发现它要容易得多。

票数 0
EN

Stack Overflow用户

发布于 2019-11-27 19:21:04

我今天也在谷歌上搜索过。基于JScript / Microsoft的脚本主机无法处理ECMAScript类型语法或Regex功能。

对我来说,我发现这很可能是因为使用了关键字,例如:

  • let
  • forEach
  • exec

(最后两个用正则匹配器)。

顺便说一句:代码是以下几个方面的合并:

  • regex101为JavaScript生成的内容,以及
  • 之类的东西。

最后,我放弃了JavaScript,转而使用了VBScript,因为我试图为regexes调用脚本代码,其中包含来自Automation的多个组,并在一次尝试中获得多个结果。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50168681

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档