Error installing agent-js

I am trying to install agent-js. After installation I run the tests (>npm run tets) and I get:
Test Suites: 12 failed, 8 passed, 20 total
Tests: 40 passed, 40 total
Below is my log. Why are 12 test suite fails? Can I ignore them or how important are those?

npm run test

@dfinity/agent-monorepo@0.10.1 test
jest

PASS principal packages/principal/src/index.test.ts
Principal
✓ encodes properly (13 ms)
✓ parses properly (16 ms)
✓ errors out on invalid checksums (23 ms)
✓ errors out on parsing invalid characters (11 ms)

PASS principal packages/principal/src/utils/getCrc.test.ts
crc
✓ works (16 ms)

PASS candid packages/candid/src/utils/leb128.test.ts
✓ leb (75 ms)
✓ sleb (57 ms)
✓ IntLE (35 ms)

PASS candid packages/candid/src/utils/hash.test.ts
✓ IDL label (77 ms)

PASS candid packages/candid/src/utils/buffer.test.ts
PipeArrayBuffer
✓ can read (39 ms)
✓ can write (32 ms)

PASS agent packages/agent/src/utils/buffer.test.ts
✓ fromHex (5 ms)
✓ fromHex (2) (4 ms)
✓ toHex (3 ms)

PASS identity packages/identity/src/identity/der.test.ts
bufEquals tests
✓ equal buffers (5 ms)
✓ rejects buffers with different lengths (3 ms)
✓ rejects buffers with different values (4 ms)
encodeLenBytes
✓ Length of up to 127 (3 ms)
✓ Length of up to 255 (7 ms)
✓ Length of up to 65536 (7 ms)
✓ Length of up to 16777215 (7 ms)
✓ Over maximum length (17 ms)
encodeLen
✓ Length of up to 127 (9 ms)
✓ Length of up to 255 (6 ms)
✓ Length of up to 65535 (6 ms)
✓ Length of up to 16777215 (7 ms)
✓ Length of up to 16777215 (7 ms)
✓ Over maximum length (4 ms)
DecodeLenBytes
✓ encoded length of zero (4 ms)
✓ encoded length of 1 (4 ms)
✓ encoded length of 2 (5 ms)
✓ encoded length of 3 (4 ms)
✓ encoded length of 4 (3 ms)
✓ encoded length of 4 (4 ms)
decodeLen
✓ encoded length of 1 (4 ms)
✓ encoded length of 2 (3 ms)
✓ encoded length of 3 (3 ms)
✓ encoded length of 4 (3 ms)
✓ length of over 4 bytes (4 ms)

PASS agent packages/agent/src/utils/bls.test.ts
✓ verify (195 ms)

FAIL identity packages/identity/src/identity/secp256k1.test.ts
● Test suite failed to run

packages/identity/src/identity/secp256k1.test.ts:1:10 - error TS2305: Module '"../../../../../node_modules/@dfinity/agent/lib/cjs"' has no exported member 'DerEncodedPublicKey'.

1 import { DerEncodedPublicKey, PublicKey } from '@dfinity/agent';
           ~~~~~~~~~~~~~~~~~~~
packages/identity/src/identity/secp256k1.test.ts:2:29 - error TS2307: Cannot find module '@dfinity/candid/lib/cjs/utils/buffer' or its corresponding type declarations.

2 import { toHexString } from '@dfinity/candid/lib/cjs/utils/buffer';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FAIL identity packages/identity/src/identity/ed25519.test.ts
● Test suite failed to run

packages/identity/src/identity/ed25519.test.ts:1:10 - error TS2305: Module '"../../../../../node_modules/@dfinity/agent/lib/cjs"' has no exported member 'DerEncodedPublicKey'.

1 import { DerEncodedPublicKey } from '@dfinity/agent';
           ~~~~~~~~~~~~~~~~~~~

FAIL identity packages/identity/src/identity/delegation.test.ts
● Test suite failed to run

packages/identity/src/identity/delegation.test.ts:7:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

7 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL agent packages/agent/src/cbor.test.ts
● Test suite failed to run

packages/agent/src/cbor.test.ts:1:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

1 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL auth-client packages/auth-client/src/index.test.ts
● Test suite failed to run

packages/auth-client/src/index.test.ts:1:36 - error TS2307: Cannot find module '@dfinity/identity' or its corresponding type declarations.

1 import { Ed25519KeyIdentity } from '@dfinity/identity';
                                     ~~~~~~~~~~~~~~~~~~~

FAIL candid packages/candid/src/idl.test.ts
● Test suite failed to run

packages/candid/src/idl.test.ts:6:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

6 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL agent packages/agent/src/certificate.test.ts
● Test suite failed to run

packages/agent/src/cbor.ts:8:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

8 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL agent packages/agent/src/request_id.test.ts
● Test suite failed to run

packages/agent/src/request_id.test.ts:3:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

3 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL agent packages/agent/src/actor.test.ts
● Test suite failed to run

packages/agent/src/actor.test.ts:1:21 - error TS2307: Cannot find module '@dfinity/candid' or its corresponding type declarations.

1 import { IDL } from '@dfinity/candid';
                      ~~~~~~~~~~~~~~~~~
packages/agent/src/actor.test.ts:2:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

2 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL agent packages/agent/src/agent/http/http.test.ts
● Test suite failed to run

packages/agent/src/agent/http/http.test.ts:5:27 - error TS2307: Cannot find module '@dfinity/principal' or its corresponding type declarations.

5 import { Principal } from '@dfinity/principal';
                            ~~~~~~~~~~~~~~~~~~~~

FAIL authentication packages/authentication/src/index.test.ts
● Test suite failed to run

packages/authentication/src/index.test.ts:6:53 - error TS2307: Cannot find module '@dfinity/identity' or its corresponding type declarations.

6 import { DelegationChain, Ed25519KeyIdentity } from '@dfinity/identity';
                                                      ~~~~~~~~~~~~~~~~~~~

FAIL authentication packages/authentication/src/index.test.ts
● Test suite failed to run

packages/authentication/src/index.test.ts:6:53 - error TS2307: Cannot find module '@dfinity/identity' or its corresponding type declarations.

6 import { DelegationChain, Ed25519KeyIdentity } from '@dfinity/identity';
                                                      ~~~~~~~~~~~~~~~~~~~

Test Suites: 12 failed, 8 passed, 20 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 12.216 s
Ran all test suites in 7 projects.

1 Like