Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(node): set noEmitOnError to always true, and show diagnostic messages from ts#3697

Merged
Cammisuli merged 3 commits intonrwl:masterfrom
Cammisuli:typescript-noemitonerror
Sep 17, 2020
Merged

fix(node): set noEmitOnError to always true, and show diagnostic messages from ts#3697
Cammisuli merged 3 commits intonrwl:masterfrom
Cammisuli:typescript-noemitonerror

Conversation

@Cammisuli
Copy link
Member

@Cammisuli Cammisuli commented Sep 9, 2020

Current Behavior

TypeScript errors are not handled properly when compiling with the node/package builder.

Expected Behavior

Error messages are properly displayed (similar to the TypeScript compiler)

Related Issue(s)

Fixes #

Output:

Compiling TypeScript files for library jest...
packages/jest/src/builders/jest/jest.impl.ts:12:21 - error TS2307: Cannot find module 'ng-packagr/lib/utils' or its corresponding type declarations.

12 import { log } from 'ng-packagr/lib/utils';
                       ~~~~~~~~~~~~~~~~~~~~~~

Copying asset files...

>  NX   CLOUD  See run details at https://nx.app/runs/UHp8nZqihTy

error Command failed with exit code 1.

@Cammisuli Cammisuli self-assigned this Sep 9, 2020
@Cammisuli Cammisuli requested a review from juristr September 9, 2020 16:26
Copy link
Member

@juristr juristr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can we add some tests to make sure we don't run into this any more? I'm thinking about compiling an invalid TS file with the node package and making sure it exits properly

@vsavkin
Copy link
Member

vsavkin commented Sep 14, 2020

I agree about adding an e2e tests. Otherwise, looks good.

@Cammisuli
Copy link
Member Author

I need to make some time to add the e2e. It should be quick though.

@juristr
Copy link
Member

juristr commented Sep 16, 2020

I need to make some time to add the e2e. It should be quick though.

cool, ping me on Slack once it is up and I can review it again

@Cammisuli Cammisuli force-pushed the typescript-noemitonerror branch 2 times, most recently from 9b0d849 to dd73bf5 Compare September 17, 2020 14:37
@nx-cloud
Copy link
Contributor

nx-cloud bot commented Sep 17, 2020

Nx Cloud Report

We didn't find any information for the current pull request 😟.
Please make sure you set the NX_BRANCH environment variable in your CI pipeline.


Sent with 💌 from NxCloud.

@Cammisuli Cammisuli force-pushed the typescript-noemitonerror branch from dd73bf5 to 784b39c Compare September 17, 2020 16:22
@juristr
Copy link
Member

juristr commented Sep 17, 2020

Awesome, lgtm 👍

@Cammisuli Cammisuli merged commit 87ded43 into nrwl:master Sep 17, 2020
@Cammisuli Cammisuli deleted the typescript-noemitonerror branch September 17, 2020 17:08
vivekmore pushed a commit to vivekmore/nx that referenced this pull request Sep 19, 2020
Doginal pushed a commit to Doginal/nx that referenced this pull request Nov 25, 2020
@github-actions
Copy link
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants