Closed sqfasd closed 6 years ago
asch 我本地启动报这个错,并没有跟 bignumber 和 ZSchema 相关,你可以贴下你的截图。这个可能原因:master 分支是需要到 public 下运行 yarn install
build 钱包相关的逻辑,develop 这块逻辑改的时候钱包的逻辑移出去了,但相关代码(应该在 asch-core)没有改?
解决方案: 手动新建 public/dist/chains/.gitkeep 可以正常运行
你的node和npm版本号与上面一致吗 我看了下,找不到module的原因是,package.json中的main字段被删除了 这时安装后的package.json
{
"_from": "https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"_id": "z-schema@3.15.2",
"_inBundle": false,
"_integrity": "sha1-0o9/OQLaCD7y16IFhwWoG9wgBV4=",
"_location": "/asch-core/z-schema",
"_phantomChildren": {},
"_requested": {
"type": "remote",
"raw": "z-schema@https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"name": "z-schema",
"escapedName": "z-schema",
"rawSpec": "https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"saveSpec": "https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"fetchSpec": "https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1"
},
"_requiredBy": [
"/asch-core"
],
"_resolved": "https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"_shrinkwrap": null,
"_spec": "z-schema@https://github.com/AschPlatform/z-schema/tarball/v3.15.2+asch.1",
"_where": "/tmp/asch-benchmark/asch/node_modules/asch-core",
"bin": {
"z-schema": "./bin/z-schema"
},
"bundleDependencies": false,
"dependencies": {
"commander": "^2.7.1",
"lodash.get": "^3.7.0",
"request": "^2.54.0",
"validator": "^4.0.5"
},
"deprecated": false,
"description": "[![npm version](https://badge.fury.io/js/z-schema.svg)](http://badge.fury.io/js/z-schema) [![bower version](https://badge.fury.io/bo/z-schema.svg)](http://badge.fury.io/bo/z-schema) [![build status](https://travis-ci.org/zaggino/z-schema.svg?branch=master)](https://travis-ci.org/zaggino/z-schema) [![coverage status](https://coveralls.io/repos/zaggino/z-schema/badge.svg)](https://coveralls.io/r/zaggino/z-schema)",
"devDependencies": {
"coveralls": "latest",
"grunt": "latest",
"grunt-browserify": "~3.2.1",
"grunt-cli": "latest",
"grunt-contrib-copy": "latest",
"grunt-contrib-jasmine": "latest",
"grunt-contrib-jshint": "latest",
"grunt-contrib-uglify": "latest",
"grunt-jasmine-node": "latest",
"grunt-jasmine-node-coverage": "latest",
"grunt-jscs": "latest",
"grunt-lineending": "latest",
"jasmine-node": "latest",
"jasmine-reporters": "latest",
"remapify": "latest"
},
"name": "z-schema",
"optionalDependencies": {
"commander": "^2.7.1",
"request": "^2.54.0"
},
"peerDependencies": {},
"scripts": {},
"version": "3.15.2"
}
但实际这个模块原始的package是有main字段的 https://github.com/AschPlatform/bignumber/blob/v1.3.0-2%2Basch.1/package.json#L23
我用 nvm 装了 node@8.2.1,npm@5.3.0 重新安装后仍然没有报 z-schema 问题。你试下删除 node_modules 重新安装 :
rm -rf node_modules
npm i
node app
Version
develop
Environment
Ubuntu 16.04.2 LTS node v 8.2.1 npm v5.3.0
Steps to reproduce
Reason
安装bignumber和ZSchema两个模块后,package.json中的main字段被删除,导致无法找到module入口