Skip to content

Not compatible with Yarn 2 & Typescript #2170

@fketchakeu

Description

@fketchakeu

Stencil version:

 @stencil/core@1.8.6

I'm submitting a:

[X ] bug report
[ ] feature request

Current behavior:

With Yarn (version 2), running the build script (stencil build) causes errors.

E.g.

➤ YN0000: [ ERROR ] TypeError: Cannot destructure property `name` of 'undefined' or
➤ YN0000:      'null'. at getPackageInformation

Expected behavior:
Successful build

Steps to reproduce:

Create a stencil starter project, but use yarn 2 and typescript.
After installing the dependencies try building by running:

yarn run build

Other information:

The error stack trace would looks something like this:

➤ YN0000: [ ERROR ]  TypeError: Cannot destructure property `name` of 'undefined' or
➤ YN0000:            'null'. at getPackageInformation
➤ YN0000:            (/Users/Path/To/Project/.pnp.js:41632:34) at
➤ YN0000:            Object.getPackageInformation
➤ YN0000:            (/Users/Path/To/Project/.pnp.js:41952:20) at
➤ YN0000:            getPnpTypeRoots
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:27922:42)
➤ YN0000:            at getDefaultTypeRoots
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:27938:24)
➤ YN0000:            at getEffectiveTypeRoots
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:27893:20)
➤ YN0000:            at Object.getAutomaticTypeDirectiveNames
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:28068:29)
➤ YN0000:            at Object.createProgram
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:95251:56)
➤ YN0000:            at Object.transpileModule
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/typescript-patch-fea84800fa-1.zip/node_modules/typescript/lib/typescript.js:116969:26)
➤ YN0000:            at transformToLazyComponentText
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/@stencil-core-npm-1.8.6-1c86e2e9d6-1.zip/node_modules/@stencil/core/dist/compiler/index.js:4695:47)
➤ YN0000:            at updateToLazyComponent
➤ YN0000:            (/Users/Path/To/Project/.yarn/cache/@stencil-core-npm-1.8.6-1c86e2e9d6-1.zip/node_modules/@stencil/core/dist/compiler/index.js:4746:24)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueThis is a good first issue for someone wantng to contribute to Stencil!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions