Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue name] #3473

Open
Jay311xx opened this issue Feb 18, 2023 · 1 comment
Open

[issue name] #3473

Jay311xx opened this issue Feb 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Jay311xx
Copy link

Jay311xx commented Feb 18, 2023

What happened?

I am getting errors trying to set up node. I have tried the Recommended installation and From Source installation. I get the same errors on both. I have installed node, rust, and yarn. All newest versions. After troubleshooting I have globally installed tsc and edited the tsconfig.json to include "types": ["node']

Attached a file with error report. I included the beginning and end in the debug output because whole thing was too many characters.

Version

No response

Debug output

yarn run v1.22.19
$ yarn build && yarn start:js
$ tsc -b
../ironfish/src/utils/types.ts:43:47 - error TS2503: Cannot find namespace 'NodeJS'.

43 export function IsNodeTimeout(timer: number | NodeJS.Timeout): timer is NodeJS.Timeout {
                                                 ~~~~~~

../ironfish/src/utils/types.ts:43:73 - error TS2503: Cannot find namespace 'NodeJS'.

43 export function IsNodeTimeout(timer: number | NodeJS.Timeout): timer is NodeJS.Timeout {
                                                                           ~~~~~~

../ironfish/src/serde/Serde.ts:10:5 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

10   | Buffer
       ~~~~~~

../ironfish/src/serde/Serde.ts:20:5 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

20   | Buffer
[Error.txt](https://github.com/iron-fish/ironfish/files/10774916/Error.txt)

       ~~~~~~

../ironfish/src/utils/buffer.ts:5:26 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.


                ~~~~~~




DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
DELETED CONTENT
       ~~~~~~~~~

                 ~~~~

../ironfish/src/testUtilities/helpers/storage.ts:7:18 - error TS2307: Cannot find module 'path' or its corresponding type declarations.

7 import path from 'path'
                   ~~~~~~

../ironfish/src/testUtilities/helpers/storage.ts:8:28 - error TS2307: Cannot find module 'uuid' or its corresponding type declarations.

8 import { v4 as uuid } from 'uuid'
                             ~~~~~~

../ironfish/src/testUtilities/helpers/storage.ts:16:20 - error TS2304: Cannot find name 'expect'.

16   const testName = expect.getState().currentTestName || ''
                      ~~~~~~

../ironfish/src/testUtilities/helpers/storage.ts:42:38 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

42   const database = createDBStorage({ location })
                                        ~~~~~~~~

  ../ironfish/src/storage/utils.ts:10:37
    10 export function createDB(options: { location: string }): IDatabase {
                                           ~~~~~~~~
    The expected type comes from property 'location' which is declared here on type '{ location: string; }'

../ironfish/src/testUtilities/helpers/storage.ts:44:3 - error TS2304: Cannot find name 'afterEach'.

44   afterEach(async () => database?.close())
     ~~~~~~~~~

../ironfish/src/testUtilities/helpers/storage.ts:52:5 - error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

52     location,
       ~~~~~~~~

  ../ironfish/src/testUtilities/helpers/storage.ts:37:29
    37 ): Promise<{ db: IDatabase; location: string }> {
                                   ~~~~~~~~
    The expected type comes from property 'location' which is declared here on type '{ db: IDatabase; location: string; }'

../ironfish/src/testUtilities/helpers/merkletree.ts:19:41 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

19   serialize(value: StructureLeafValue): Buffer {
                                           ~~~~~~

../ironfish/src/testUtilities/helpers/merkletree.ts:28:23 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

28   deserialize(buffer: Buffer): StructureLeafValue {
                         ~~~~~~

../ironfish/src/testUtilities/helpers/merkletree.ts:42:40 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

42   serialize(value: NodeValue<string>): Buffer {
                                          ~~~~~~

../ironfish/src/testUtilities/helpers/merkletree.ts:58:23 - error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

58   deserialize(buffer: Buffer): NodeValue<string> {
                         ~~~~~~

tsconfig.json:7:5 - error TS1005: ',' expected.

7     "types": ["node"]
      ~~~~~~~


Found 997 errors.

Relevant log output

No response

Graffiti

No response

@Jay311xx Jay311xx added the bug Something isn't working label Feb 18, 2023
@holahula
Copy link
Contributor

Did you build in ironfish/ironfish before trying yarn start:js in the ironfish/ironfish-cli?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants