Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tslib required? #39

Open
patlux opened this issue Nov 16, 2021 · 0 comments
Open

tslib required? #39

patlux opened this issue Nov 16, 2021 · 0 comments

Comments

@patlux
Copy link

patlux commented Nov 16, 2021

I have a build.ts which I run to compile my source files with esbuild. To run it I have a npm-run-script:

"compile": "node -r esbuild-runner/register build.ts",

We do not have tslib explicitly installed in our project. When running the above command we get the following error:

/Users/<project-folder>/node_modules/esbuild-runner/lib/esbuild.js:22
    externals = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], Object.keys((_a = pkg.dependencies) !== null && _a !== void 0 ? _a : {}), true), Object.keys((_b = pkg.devDependencies) !== null && _b !== void 0 ? _b : {}), true);
 

TypeError: (0 , tslib_1.__spreadArray) is not a function
    at Object.<anonymous> (/Users/<project-folder>/node_modules/esbuild-runner/lib/esbuild.js:22:70)

20211116-194635_Screenshot

If I add tslib explicitly to the project, the above command runs without any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant