Closed lucafra23 closed 5 years ago
seems like RPC interface is not up.
From the element-lib directory:
In 2 terminal windows, run:
npm run ipfs
and
npm run ganache
they should run on 5001 and 8545 respectively,
then try running npm run contracts:migrate:dev
we are missing these instructions in the readme.... thanks for opening this @lucafra23
I have added a much simpler setup process in https://github.com/decentralized-identity/element/pull/30
Build server is now reproducing this: https://travis-ci.org/decentralized-identity/element/jobs/554444482#L501
Thanks to you for the very quick answer, it was useful because I could finally run the command "npm run test".
I just got some logs which shows is yet not working properly, anyway I'm gonna check the set up process you mentioned.
I share you here the latest logs I got, so it's easier to unerstand if it is a problem with my setup or a server issue.
~/element/packages/element-lib$ npm run test
@transmute/element-lib@0.0.2-0 test /home/ubuntu/element/packages/element-lib jest --runInBand (node:13428) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5001 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14) (node:13428) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:13428) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. FAIL src/tests/LatePublishAttack.spec.js (13.366s) ● LatePublishAttack › create a did
connect ECONNREFUSED 127.0.0.1:5001 ● LatePublishAttack › pretend to transfer
connect ECONNREFUSED 127.0.0.1:5001 ● LatePublishAttack › observers think the transfer occured
TypeError: Cannot read property 'publicKey' of null
166 | await sleep(3);
167 | const didDoc = await sidetree.resolve(did:elem:${didUniqueSuffix}
);
168 | expect(didDoc.publicKey[0].publicKeyHex).toBe(primaryKeypair2.publicKey); | ^ 169 | expect(didDoc.publicKey[1].publicKeyHex).toBe(recoveryKeypair2.publicKey); 170 | }); 171 |
at Object.publicKey (src/tests/LatePublishAttack.spec.js:168:19) ● LatePublishAttack › observers can see the transfer never occured.
connect ECONNREFUSED 127.0.0.1:5001
. . . . .
......a lot of logs later........
. . . .
FAIL src/adapters/storage/ipfs/tests/storage.ipfs.spec.js ● storage.ipfs › write › should write and return content id
connect ECONNREFUSED 127.0.0.1:5001
● storage.ipfs › read › should write and return content id
connect ECONNREFUSED 127.0.0.1:5001
Test Suites: 16 failed, 17 passed, 33 total
Tests: 39 failed, 1 skipped, 38 passed, 78 total
Snapshots: 4 passed, 4 total
Time: 249.577s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @transmute/element-lib@0.0.2-0 test: jest --runInBand
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @transmute/element-lib@0.0.2-0 test 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! /home/ubuntu/.npm/_logs/2019-07-04T16_01_31_126Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle @transmute/element-lib@0.0.2-0~pretest: @transmute/element-lib@0.0.2-0
6 info lifecycle @transmute/element-lib@0.0.2-0~test: @transmute/element-lib@0.0.2-0
7 verbose lifecycle @transmute/element-lib@0.0.2-0~test: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element-lib@0.0.2-0~test: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/packages/element-lib/node$
9 verbose lifecycle @transmute/element-lib@0.0.2-0~test: CWD: /home/ubuntu/element/packages/element-lib
10 silly lifecycle @transmute/element-lib@0.0.2-0~test: Args: [ '-c', 'jest --runInBand ' ]
11 silly lifecycle @transmute/element-lib@0.0.2-0~test: Returned: code: 1 signal: null
12 info lifecycle @transmute/element-lib@0.0.2-0~test: Failed to exec test script
13 verbose stack Error: @transmute/element-lib@0.0.2-0 test: jest --runInBand
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.jest --runInBand
22 error Exit status 1
23 error Failed at the @transmute/element-lib@0.0.2-0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
^ these logs indicate that IPFS is not up.
You should be able to use the ipfs command to start it until next PR is merged (which should help with this setup process).
# in the element-lib directory
npm run ipfs
You can also install and start IPFS yourself if you don't want to use the npm module for it.
once the binary is installed, it should be as simple as:
ipfs init
ipfs daemon
@lucafra23
I think this issue should be resolved, although IPFS dist server has been down causing npm install to fail lately.
You should be able to start Ethereum and IPFS correctly from the root directory of the repo, as is done by travis:
https://github.com/decentralized-identity/element/blob/development/.travis.yml#L9
This should automatically migrate contracts and initialize things properly.
If this works for you let me know and I will close this issue, if not, paste me any errors you see.
also note that if you plan to run the web app locally, you will need to adjust the config to use LOCAL:
and you will need to tell metamask to use http://localhost:8545 in order to use the dapp.
Hi Orie, thanks a lot for your help.
I created a new instance on AWS and started the process from scratch: Indeed, IPFS and Ganache now seem to work correctly.
Anyway, I am still receiving some error logs, but I am not really sure on what's happening exactly.
I write you here what I have done and what logs I received, it's probably gonna be a very long comment, but I hope it lets you understand better the situation:
-npm i -----> works good -npm run test:contracts logs:
@transmute/element@ test:contracts /home/ubuntu/element lerna run test:contracts --stream
lerna notice cli v3.15.0
lerna info Executing command in 1 package: "npm run test:contracts"
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 pretest:contracts /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > npm run services:start
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > ./scripts/start_services.sh
@transmute/element-lib: 🧙 Starting Element Services...
@transmute/element-lib: ✨ Starting GANACHE on 8545
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 contracts:migrate:dev /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > truffle migrate --network development --reset
@transmute/element-lib: Compiling your contracts...
@transmute/element-lib: ===========================
@transmute/element-lib: Killed
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 137
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 contracts:migrate:dev: truffle migrate --network development --reset
@transmute/element-lib: npm ERR! Exit status 137
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 contracts:migrate:dev script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_19_48_364Z-debug.log
@transmute/element-lib: lerna notice cli v3.15.0
@transmute/element-lib: lerna info Executing command in 1 package: "npm run env:create:local"
@transmute/element-lib: @transmute/element-api: > @transmute/element-api@0.0.2-2 env:create:local /home/ubuntu/element/packages/element-api
@transmute/element-lib: @transmute/element-api: > node ./scripts/env_to_json_config.js local ../../example.env ./local.runtimeconfig.json && ./scripts/update_runtimeconfig_contract.sh ./local.runtimeconfig.json
@transmute/element-lib: @transmute/element-api: ./scripts/update_runtimeconfig_contract.sh: 3: ./scripts/update_runtimeconfig_contract.sh: jq: not found
@transmute/element-lib: @transmute/element-api: cat: ./node_modules/@transmute/element-lib/build/contracts/SimpleSidetreeAnchor.json: No such file or directory
@transmute/element-lib: @transmute/element-api: 👷 Modifying ./local.runtimeconfig.json
@transmute/element-lib: @transmute/element-api: ✅ element.ethereum.anchor_contract_address:
@transmute/element-lib: @transmute/element-api: ./scripts/update_runtimeconfig_contract.sh: 10: ./scripts/update_runtimeconfig_contract.sh: jq: not found
@transmute/element-lib: @transmute/element-api: npm ERR! file sh
@transmute/element-lib: @transmute/element-api: npm ERR! code ELIFECYCLE
@transmute/element-lib: @transmute/element-api: npm ERR! errno ENOENT
@transmute/element-lib: @transmute/element-api: npm ERR! syscall spawn
@transmute/element-lib: @transmute/element-api: npm ERR! @transmute/element-api@0.0.2-2 env:create:local: node ./scripts/env_to_json_config.js local ../../example.env ./local.runtimeconfig.json && ./scripts/update_runtimeconfig_contract.sh ./local.runtimeconfig.json
@transmute/element-lib: @transmute/element-api: npm ERR! spawn ENOENT
@transmute/element-lib: @transmute/element-api: npm ERR!
@transmute/element-lib: @transmute/element-api: npm ERR! Failed at the @transmute/element-api@0.0.2-2 env:create:local script.
@transmute/element-lib: @transmute/element-api: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: @transmute/element-api: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: @transmute/element-api: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_19_49_920Z-debug.log
@transmute/element-lib: lerna ERR! npm run env:create:local exited 1 in '@transmute/element-api'
@transmute/element-lib: ✨ Starting IPFS on 5001
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 test:contracts /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > npx truffle test
@transmute/element-lib: Killed
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 137
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 test:contracts: npx truffle test
@transmute/element-lib: npm ERR! Exit status 137
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 test:contracts script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_19_57_585Z-debug.log
lerna ERR! npm run test:contracts exited 137 in '@transmute/element-lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! @transmute/element@ test:contracts: lerna run test:contracts --stream
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the @transmute/element@ test:contracts 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! /home/ubuntu/.npm/_logs/2019-07-11T09_19_57_639Z-debug.log
nano/ /home/ubuntu/.npm/_logs/2019-07-11T09_19_57_639Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test:contracts' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'pretest:contracts', 'test:contracts', 'posttest:contracts' ]
5 info lifecycle @transmute/element@~pretest:contracts: @transmute/element@
6 info lifecycle @transmute/element@~test:contracts: @transmute/element@
7 verbose lifecycle @transmute/element@~test:contracts: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element@~test:contracts: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/node_modules/.bin:/usr/local/sbin:/$
9 verbose lifecycle @transmute/element@~test:contracts: CWD: /home/ubuntu/element
10 silly lifecycle @transmute/element@~test:contracts: Args: [ '-c', 'lerna run test:contracts --stream' ]
11 silly lifecycle @transmute/element@~test:contracts: Returned: code: 137 signal: null
12 info lifecycle @transmute/element@~test:contracts: Failed to exec test:contracts script
13 verbose stack Error: @transmute/element@ test:contracts: lerna run test:contracts --stream
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.lerna run test:contracts --stream
22 error Exit status 137
23 error Failed at the @transmute/element@ test:contracts script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
Then, I think I understood what you have told me about the travis.yml, and for this reason I wrote the travis.yml commands manually:
npm run services:start
@transmute/element@ services:start /home/ubuntu/element lerna run services:start --stream
lerna notice cli v3.15.0 lerna info Executing command in 1 package: "npm run services:start" @transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib @transmute/element-lib: > ./scripts/start_services.sh @transmute/element-lib: 🧙 Starting Element Services... @transmute/element-lib: ✅ Using GANACHE on 8545 @transmute/element-lib: ✅ Using IPFS on 5001 lerna success run Ran npm script 'services:start' in 1 package in 0.4s: lerna success - @transmute/element-lib
npm run services:healthcheck
@transmute/element@ services:healthcheck /home/ubuntu/element lerna run services:healthcheck --stream
lerna notice cli v3.15.0 lerna info Executing command in 1 package: "npm run services:healthcheck" @transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:healthcheck /home/ubuntu/element/packages/element-lib @transmute/element-lib: > ./scripts/healthcheck.sh @transmute/element-lib: 👩⚕️ Checking Element Services... @transmute/element-lib: ✅ GANACHE is up. @transmute/element-lib: ✅ IPFS is up. lerna success run Ran npm script 'services:healthcheck' in 1 package in 0.5s: lerna success - @transmute/element-lib
Then running again npm run test:contracts, everything seems to work: npm run test:contracts
@transmute/element@ test:contracts /home/ubuntu/element lerna run test:contracts --stream
lerna notice cli v3.15.0 lerna info Executing command in 1 package: "npm run test:contracts" @transmute/element-lib: > @transmute/element-lib@0.0.2-2 pretest:contracts /home/ubuntu/element/packages/element-lib @transmute/element-lib: > npm run services:start @transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib @transmute/element-lib: > ./scripts/start_services.sh @transmute/element-lib: 🧙 Starting Element Services... @transmute/element-lib: ✅ Using GANACHE on 8545 @transmute/element-lib: ✅ Using IPFS on 5001 @transmute/element-lib: > @transmute/element-lib@0.0.2-2 test:contracts /home/ubuntu/element/packages/element-lib @transmute/element-lib: > npx truffle test @transmute/element-lib: Compiling your contracts... @transmute/element-lib: =========================== @transmute/element-lib: > Compiling ./contracts/Migrations.sol @transmute/element-lib: > Compiling ./contracts/SimpleSidetreeAnchor.sol @transmute/element-lib: > Artifacts written to /tmp/test-119611-27191-1sqhx0k.i7q3 @transmute/element-lib: > Compiled successfully using: @transmute/element-lib: - solc: 0.5.0+commit.1d4f565a.Emscripten.clang @transmute/element-lib: @transmute/element-lib: Contract: SimpleSidetreeAnchor @transmute/element-lib: ✓ contract is deployed @transmute/element-lib: ✓ can write anchor (99ms) @transmute/element-lib: ✓ can read anchor @transmute/element-lib: ✓ can listen for anchor (43ms) @transmute/element-lib: 4 passing (179ms) lerna success run Ran npm script 'test:contracts' in 1 package in 10.2s: lerna success - @transmute/element-lib
Now the problems starts from the command:
npm run coverage
@transmute/element@ coverage /home/ubuntu/element lerna run coverage --stream
lerna notice cli v3.15.0
lerna info Executing command in 2 packages: "npm run coverage"
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 precoverage /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > npm run services:start
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > ./scripts/start_services.sh
@transmute/element-lib: 🧙 Starting Element Services...
@transmute/element-lib: ✅ Using GANACHE on 8545
@transmute/element-lib: ✅ Using IPFS on 5001
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 coverage /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > jest --runInBand --coverage
@transmute/element-lib: FAIL src/tests/LatePublishAttack.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/func/operationsToAnchorFile.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/crypto/Needham-Schroeder/Needham-Schroeder.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../tests/fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/tests/CRUD.One.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: 'fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/adapters/blockchain/ethereum/tests/nonce.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: Killed
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 137
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 coverage: jest --runInBand --coverage
@transmute/element-lib: npm ERR! Exit status 137
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 coverage script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_22_40_987Z-debug.log
lerna ERR! npm run coverage exited 137 in '@transmute/element-lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! @transmute/element@ coverage: lerna run coverage --stream
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the @transmute/element@ coverage 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! /home/ubuntu/.npm/_logs/2019-07-11T09_22_41_042Z-debug.log
which gives me this specific log in /home/ubuntu/.npm/_logs/2019-07-11T09_22_41_042Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'coverage' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'precoverage', 'coverage', 'postcoverage' ]
5 info lifecycle @transmute/element@~precoverage: @transmute/element@
6 info lifecycle @transmute/element@~coverage: @transmute/element@
7 verbose lifecycle @transmute/element@~coverage: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element@~coverage: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/node_modules/.bin:/usr/local/sbin:/usr/lo$
9 verbose lifecycle @transmute/element@~coverage: CWD: /home/ubuntu/element
10 silly lifecycle @transmute/element@~coverage: Args: [ '-c', 'lerna run coverage --stream' ]
11 silly lifecycle @transmute/element@~coverage: Returned: code: 137 signal: null
12 info lifecycle @transmute/element@~coverage: Failed to exec coverage script
13 verbose stack Error: @transmute/element@ coverage: lerna run coverage --stream
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.lerna run coverage --stream
22 error Exit status 137
23 error Failed at the @transmute/element@ coverage script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
npm run codecov
@transmute/element@ codecov /home/ubuntu/element codecov
/ __| | |
| | | | _ ___
| | / \ / ` |/ _ \/ / \ \ / /
| || () | (| | / (| () \ V /
__/ _,|_|__/ _/
v3.2.0
==> Detecting CI Provider
No CI Detected. Using git/mercurial
==> Configuration:
Endpoint: https://codecov.io
{ commit: 'ff0a78331699fc7102c051f50800853b4e3920d4',
branch: 'development',
package: 'node-v3.2.0' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /home/ubuntu/element -type f -name '*.gcno' -exec gcov {} +
==> Scanning for reports
X Failed to read file at
==> Uploading reports
HTTP 400
Please provide the repository token to upload reports via -t :repository-token
Here also something fails: npm run test
@transmute/element@ test /home/ubuntu/element lerna run test --stream
lerna notice cli v3.15.0
lerna info Executing command in 3 packages: "npm run test"
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 pretest /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > npm run services:start
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > ./scripts/start_services.sh
@transmute/element-lib: 🧙 Starting Element Services...
@transmute/element-lib: ✅ Using GANACHE on 8545
@transmute/element-lib: ✅ Using IPFS on 5001
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 test /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > jest --runInBand
@transmute/element-lib: FAIL src/tests/LatePublishAttack.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/func/operationsToAnchorFile.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/crypto/Needham-Schroeder/Needham-Schroeder.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../tests/fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/tests/CRUD.One.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: 'fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/adapters/blockchain/ethereum/tests/nonce.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: Killed
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 137
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 test: jest --runInBand
@transmute/element-lib: npm ERR! Exit status 137
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 test script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_23_53_511Z-debug.log
lerna ERR! npm run test exited 137 in '@transmute/element-lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! @transmute/element@ test: lerna run test --stream
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the @transmute/element@ test 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! /home/ubuntu/.npm/_logs/2019-07-11T09_23_53_565Z-debug.log
where I get the more specific log in /home/ubuntu/.npm/_logs/2019-07-11T09_23_53_565Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle @transmute/element@~pretest: @transmute/element@
6 info lifecycle @transmute/element@~test: @transmute/element@
7 verbose lifecycle @transmute/element@~test: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element@~test: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/node_modules/.bin:/usr/local/sbin:/usr/local/$
9 verbose lifecycle @transmute/element@~test: CWD: /home/ubuntu/element
10 silly lifecycle @transmute/element@~test: Args: [ '-c', 'lerna run test --stream' ]
11 silly lifecycle @transmute/element@~test: Returned: code: 137 signal: null
12 info lifecycle @transmute/element@~test: Failed to exec test script
13 verbose stack Error: @transmute/element@ test: lerna run test --stream
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.lerna run test --stream
22 error Exit status 137
23 error Failed at the @transmute/element@ test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
and here:
npm run lint
@transmute/element@ lint /home/ubuntu/element lerna run lint --stream
lerna notice cli v3.15.0
lerna info Executing command in 3 packages: "npm run lint"
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 lint /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > eslint ./src
@transmute/element-lib: /home/ubuntu/element/packages/element-lib/src/adapters/blockchain/ethereum/index.js
@transmute/element-lib: 8:40 error Unable to resolve path to module '../../../../build/contracts/SimpleSidetreeAnchor.json' import/no-unresolved
@transmute/element-lib: 8:40 error "../../../../build/contracts/SimpleSidetreeAnchor.json" is not found node/no-missing-require
@transmute/element-lib: ✖ 2 problems (2 errors, 0 warnings)
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 1
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 lint: eslint ./src
@transmute/element-lib: npm ERR! Exit status 1
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 lint script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_25_38_719Z-debug.log
lerna ERR! npm run lint exited 1 in '@transmute/element-lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @transmute/element@ lint: lerna run lint --stream
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @transmute/element@ lint 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! /home/ubuntu/.npm/_logs/2019-07-11T09_25_38_744Z-debug.log
where I get the more specific log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'lint' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle @transmute/element@~prelint: @transmute/element@
6 info lifecycle @transmute/element@~lint: @transmute/element@
7 verbose lifecycle @transmute/element@~lint: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element@~lint: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/node_modules/.bin:/usr/local/sbin:/usr/local/$
9 verbose lifecycle @transmute/element@~lint: CWD: /home/ubuntu/element
10 silly lifecycle @transmute/element@~lint: Args: [ '-c', 'lerna run lint --stream' ]
11 silly lifecycle @transmute/element@~lint: Returned: code: 1 signal: null
12 info lifecycle @transmute/element@~lint: Failed to exec lint script
13 verbose stack Error: @transmute/element@ lint: lerna run lint --stream
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.lerna run lint --stream
22 error Exit status 1
23 error Failed at the @transmute/element@ lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
and finally here:
npm run coverage
@transmute/element@ coverage /home/ubuntu/element lerna run coverage --stream
lerna notice cli v3.15.0
lerna info Executing command in 2 packages: "npm run coverage"
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 precoverage /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > npm run services:start
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 services:start /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > ./scripts/start_services.sh
@transmute/element-lib: 🧙 Starting Element Services...
@transmute/element-lib: ✅ Using GANACHE on 8545
@transmute/element-lib: ✅ Using IPFS on 5001
@transmute/element-lib: > @transmute/element-lib@0.0.2-2 coverage /home/ubuntu/element/packages/element-lib
@transmute/element-lib: > jest --runInBand --coverage
@transmute/element-lib: FAIL src/tests/LatePublishAttack.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/func/operationsToAnchorFile.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/crypto/Needham-Schroeder/Needham-Schroeder.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../tests/fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/tests/CRUD.One.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: 'fixtures/getLocalSidetree.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: FAIL src/adapters/blockchain/ethereum/tests/nonce.spec.js
@transmute/element-lib: ● Test suite failed to run
@transmute/element-lib: Cannot find module '../../../../build/contracts/SimpleSidetreeAnchor.json' from 'index.js'
@transmute/element-lib: However, Jest was able to find:
@transmute/element-lib: '../../../../../index.js'
@transmute/element-lib: You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].
@transmute/element-lib: See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string
@transmute/element-lib: 6 | const base58EncodedMultihashToBytes32 = require('../../../func/base58EncodedMultihashToBytes32');
@transmute/element-lib: 7 |
@transmute/element-lib: > 8 | const anchorContractArtifact = require('../../../../build/contracts/SimpleSidetreeAnchor.json');
@transmute/element-lib: | ^
@transmute/element-lib: 9 |
@transmute/element-lib: 10 | const getWeb3 = ({ mnemonic, hdPath, providerUrl }) => {
@transmute/element-lib: 11 | // eslint-disable-next-line
@transmute/element-lib: at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:202:17)
@transmute/element-lib: at Object.require (src/adapters/blockchain/ethereum/index.js:8:32)
@transmute/element-lib: Killed
@transmute/element-lib: npm ERR! code ELIFECYCLE
@transmute/element-lib: npm ERR! errno 137
@transmute/element-lib: npm ERR! @transmute/element-lib@0.0.2-2 coverage: jest --runInBand --coverage
@transmute/element-lib: npm ERR! Exit status 137
@transmute/element-lib: npm ERR!
@transmute/element-lib: npm ERR! Failed at the @transmute/element-lib@0.0.2-2 coverage script.
@transmute/element-lib: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@transmute/element-lib: npm ERR! A complete log of this run can be found in:
@transmute/element-lib: npm ERR! /home/ubuntu/.npm/_logs/2019-07-11T09_31_08_339Z-debug.log
lerna ERR! npm run coverage exited 137 in '@transmute/element-lib'
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! @transmute/element@ coverage: lerna run coverage --stream
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the @transmute/element@ coverage 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! /home/ubuntu/.npm/_logs/2019-07-11T09_31_08_505Z-debug.log
where I get this more specific log in /home/ubuntu/.npm/_logs/2019-07-11T09_31_08_505Z-debug.log:
info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'coverage' ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose run-script [ 'precoverage', 'coverage', 'postcoverage' ]
5 info lifecycle @transmute/element@~precoverage: @transmute/element@
6 info lifecycle @transmute/element@~coverage: @transmute/element@
7 verbose lifecycle @transmute/element@~coverage: unsafe-perm in lifecycle true
8 verbose lifecycle @transmute/element@~coverage: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/node_modules/.bin:/usr/local/sbin:/usr/lo$
9 verbose lifecycle @transmute/element@~coverage: CWD: /home/ubuntu/element
10 silly lifecycle @transmute/element@~coverage: Args: [ '-c', 'lerna run coverage --stream' ]
11 silly lifecycle @transmute/element@~coverage: Returned: code: 137 signal: null
12 info lifecycle @transmute/element@~coverage: Failed to exec coverage script
13 verbose stack Error: @transmute/element@ coverage: lerna run coverage --stream
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.lerna run coverage --stream
22 error Exit status 137
23 error Failed at the @transmute/element@ coverage script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
Sorry for the long message, I thought it was useful for you to see exactly what's happening here.
From what I understand, Ganache and IPFS are working. Still I am not sure while I got fail errors, so it would be interesting for me to hear your opinion.
Again thanks a lot for your help and quick answers, I really appreciate that
hmm, the use of jq
is causing this test to fail.. its probably a bad idea for us to require bash environment scripts like that.
You can install jq
to resolve some of these issues.
because truffle is failing (becuase of jq), you don't have contracts built, which then causes everything else to fail.
i see..I installed jq, but still I got errors and exit status 137 on the commands I launch.
When I launch npm run coverage, I got exit status 1.
Any ideas on how to fix it? Or should I wait for Element V1 release?
Hmm, seems you are having the same error as https://github.com/decentralized-identity/element/issues/42
We're gonna take a look over the next day. Sorry for the delay.
Hi @lucafra23 , thanks for reporting! We added some instructions to run element on EC2 in the Readme.
Note that the 137 error is due to lack of RAM, so you'll need at least 2 GB to run element. We recommend using a t2.small for EC2.
I'm closing this for now, but feel free to reopen if the issue persits.
Hi All, i am having problem with the command "npm run contracts:migrate:dev"
After the command, I have the following logs:
lerna notice cli v3.14.1 lerna info Executing command in 2 packages: "npm run contracts:migrate:dev" lerna ERR! npm run contracts:migrate:dev exited 1 in '@transmute/element-lib' lerna ERR! npm run contracts:migrate:dev stdout:
Compiling your contracts...
connection not open Truffle v5.0.26 (core: 5.0.26) Node v10.16.0
lerna ERR! npm run contracts:migrate:dev stderr: connection not open on send() npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @transmute/element-lib@0.0.2-0 contracts:migrate:dev:
truffle migrate --network development --reset
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @transmute/element-lib@0.0.2-0 contracts:migrate:dev 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! /home/ubuntu/.npm/_logs/2019-07-04T09_07_51_145Z-debug.log
in "/home/ubuntu/.npm/_logs/2019-07-04T09_07_51_145Z-debug.log" i finds the following: lerna ERR! npm run contracts:migrate:dev exited 1 in '@transmute/element-lib' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @transmute/element@ contracts:migrate:dev:
lerna run contracts:migrate:dev
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @transmute/element@ contracts:migrate:dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.and in "/home/ubuntu/.npm/_logs/2019-07-04T09_07_51_259Z-debug.log" I got the following:
info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', 1 verbose cli '/usr/bin/npm', 1 verbose cli 'run', 1 verbose cli 'contracts:migrate:dev' ] 2 info using npm@6.9.0 3 info using node@v10.16.0 4 verbose run-script [ 'precontracts:migrate:dev', 4 verbose run-script 'contracts:migrate:dev', 4 verbose run-script 'postcontracts:migrate:dev' ] 5 info lifecycle @transmute/element-lib@0.0.2-0~precontracts:migrate:dev: @transmute/element-lib@0.0.2-0 6 info lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: @transmute/element-lib@0.0.2-0 7 verbose lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: unsafe-perm in lifecycle true 8 verbose lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/element/packages/element-lib/node_modules/$ 9 verbose lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: CWD: /home/ubuntu/element/packages/element-lib 10 silly lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: Args: [ '-c', 'truffle migrate --network development --reset' ] 11 silly lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: Returned: code: 1 signal: null 12 info lifecycle @transmute/element-lib@0.0.2-0~contracts:migrate:dev: Failed to exec contracts:migrate:dev script 13 verbose stack Error: @transmute/element-lib@0.0.2-0 contracts:migrate:dev: (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @transmute/element-lib@0.0.2-0
15 verbose cwd /home/ubuntu/element/packages/element-lib
16 verbose Linux 4.15.0-1043-aws
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "contracts:migrate:dev"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error @transmute/element-lib@0.0.2-0 contracts:migrate:dev:
truffle migrate --network development --reset
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.truffle migrate --network development --reset
22 error Exit status 1 23 error Failed at the @transmute/element-lib@0.0.2-0 contracts:migrate:dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]Anyone knows where is the problem?
I thought I had to opens some ports, but opening 30303 and 30304 didn't work either.
Thanks!