sindresorhus / is

Type check values
MIT License
1.68k stars 109 forks source link

Parcel JS build issue - No Main #177

Closed abjfdi closed 1 year ago

abjfdi commented 1 year ago

Hi just to let you know.

Description

When I use a package that has a dependency on "@sindresorhus/is" in a Parcel build it complains that it can't find the module. This is because the package is marked as a module but is missing the main field in the package.json. I am currently working around this in my build by modifying your package.json in my node_modules folder to include the main field.

Solution

Could you please add the main field to you package.json as shown below?

// package.json
{
    "name": "@sindresorhus/is",
    "main": "./dist/index.js",
    ...., // rest of file
}
sindresorhus commented 1 year ago

This is a problem with Parcel and not this package. Open an issue on the Parcel issue tracker instead.