angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

esbuild - do not ignore d.ts files, please

Open e-oz opened this issue 3 years ago • 3 comments

Command

build

Is this a regression?

  • [X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

@angular/compiler-cli 15.0.1

Description

Please do not ignore d.ts files in source code - esbuild fails because of it.

Minimal Reproduction

ng build

Exception or Error

No response

Your Environment

all the latest versions of Angular libs
node 19

Anything else relevant?

No response

e-oz avatar Nov 24 '22 08:11 e-oz

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?

You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

This might be related to your directory structure so its really important to get an accurate repro to diagnose this.

alan-agius4 avatar Nov 24 '22 09:11 alan-agius4

it's a bug, not a feature request, so reproduction is needed, sure. Right now I have a pretty busy day, sorry for the sloppy bug report. I'll add repro tomorrow, I've posted it in hope that maybe you've added "*.d.ts" filter on purpose and then you would know what I'm talking about instantly, without repro :)

Right now I can only show a folder in the project where this issue was found, later I'll add repro. Screenshot 2022-11-24 at 10 23 31

Error message:

✘ [ERROR] [plugin angular-compiler] File 'libs/monaco-editor/src/lib/editor.api.d.ts' is missing from the TypeScript compilation.

    libs/monaco-editor/src/lib/interfaces.ts:1:14:
      1 │ export * from './editor.api.d';
        ╵               ~~~~~~~~~~~~~~~~

  Ensure the file is part of the TypeScript program via the 'files' or 'include' property.

e-oz avatar Nov 24 '22 09:11 e-oz

Forgot to say: non-esbuild version works fine.

e-oz avatar Nov 24 '22 09:11 e-oz

While building a reproduction repo, I found the workaround and what caused the problem - export * from... And it's actually better to remove it from my code :)

e-oz avatar Dec 02 '22 15:12 e-oz

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.