Skip to content

Use of node.js builtins (util/types) #96

@manspaniel

Description

@manspaniel

Hi there,

Thanks for all your work on Typir @JohannesMeierSE! I'm enjoying using it.

Still on 0.3.0, and running the LSP in the browser via Vite.

I'm getting some errors due to use of the Node.js util/types module in Typir. Vite doesn't provide polyfills for Node builtins, and produces an error during build:

Failed to resolve import "util/types"

I believe it's due to these two lines:

import { isMap, isSet } from 'util/types';

import { isMap, isSet } from 'util/types';

It works fine in VSCode + Node, of course! For now I'm adding a polyfill via esbuild options for those two functions, but just thought I should point it out!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions