Skip to content

[Potential Bug] package.json node version is not compatible with typescript version #243

@zhuoqun-chen

Description

@zhuoqun-chen

Hi @Mateusz-Grzelinski, I think here in package.json has some version compatible issue, at least on my side:

"devDependencies": {
    "@types/node": "^8.10.25",
    "typescript": "^5.5.2"
  },
> npm install
> npm run vscode:prepublish

> blender-development@0.0.26 vscode:prepublish
> npm run compile

> blender-development@0.0.26 compile
> tsc -p ./

node_modules/@types/node/base.d.ts:800:11 - error TS2430: Interface 'NodeBuffer' incorrectly extends interface 'Uint8Array<ArrayBufferLike>'.
  The types of 'slice(...).buffer' are incompatible between these types.
    Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'.
      Type 'SharedArrayBuffer' is not assignable to type 'ArrayBuffer'.
        Types of property '[Symbol.toStringTag]' are incompatible.
          Type '"SharedArrayBuffer"' is not assignable to type '"ArrayBuffer"'.

800 interface NodeBuffer extends Uint8Array {
              ~~~~~~~~~~


Found 1 error in node_modules/@types/node/base.d.ts:800

After upgrading the node type to ^20.19.3, it worked out for me:

npm run vscode:prepublish

> blender-development@0.0.26 vscode:prepublish
> npm run compile


> blender-development@0.0.26 compile
> tsc -p ./

I'm very happy to create a PR for this if it's a common issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions