elements icon indicating copy to clipboard operation
elements copied to clipboard

Build failed in node 20 related to tslib

Open ellyx-csg opened this issue 1 year ago • 3 comments

Context

I'm trying to build latest changes in main branch using node v20

Node version: 20.11.1 yarn version: 1.22.19 Platform: Darwin Kernel Version 22.6.0 arm64

Current Behavior

Build is failing with error:

Error loading `tslib` helper library.
[!] Error: Package subpath './package.json' is not defined by "exports" in elements/node_modules/rollup-plugin-typescript2/node_modules/tslib/package.json
Error: Package subpath './package.json' is not defined by "exports" in elements/node_modules/rollup-plugin-typescript2/node_modules/tslib/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:303:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:650:9)
    at resolveExports (node:internal/modules/cjs/loader:591:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:668:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
    at Function.Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (elements/node_modules/rollup-plugin-typescript2/src/tslib.ts:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)

Expected Behavior

Build success

Possible Solution(s)

ellyx-csg avatar May 08 '24 07:05 ellyx-csg

Yeah, it works best with Node v16 and Yarn 1.22.x

weyert avatar May 20 '24 17:05 weyert

This ticket has been labeled jira. A tracking ticket in Stoplight's Jira (STOP-619) has been created.

github-actions[bot] avatar Jun 07 '24 14:06 github-actions[bot]

Possibly related: https://github.com/microsoft/tslib/pull/135

saper avatar Jun 21 '24 23:06 saper