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

Test compilation errors do not fail karma tasks #780

Closed
adidahiya opened this issue Mar 5, 2017 · 5 comments
Closed

Test compilation errors do not fail karma tasks #780

adidahiya opened this issue Mar 5, 2017 · 5 comments

Comments

@adidahiya
Copy link
Contributor

Discovered in #775 (comment)

Current compilation failures are fixed in #779, but we need to fix the build system to fail on tsc errors. I tried to get this working using solutions from TypeStrong/ts-loader#108 but did not succeed. A quick and dirty fix would be to run tsc -p packages/<name>/test commands in the verify script or in gulp check. Or we could try upgrading to webpack 2 (shouldn't be too hard; I just did it on another project).

@adidahiya
Copy link
Contributor Author

Same goes for tsc errors in examples via npm run build:gulp

ERROR in ./packages/table/examples/tableFormatsExample.tsx
(13,10): error TS6133: 'TruncatedPopoverMode' is declared but never used.

@adidahiya adidahiya added this to the 1.12.0 milestone Mar 6, 2017
@giladgray
Copy link
Contributor

i'm down for webpack 2 upgrade. i actually did that locally last week as part of the unpkg work but then realized webpack 1 supported what i was trying to do.

@giladgray
Copy link
Contributor

giladgray commented Mar 6, 2017

I can't seem to upgrade to webpack2. Getting this error from ts-loader:

[12:40:26] Starting 'webpack-docs'...
(node:69788) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'default' of undefined
(node:69788) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[12:40:26] [webpack] Time: 83ms
      Asset     Size  Chunks             Chunk Names
    docs.js     3 kB       0  [emitted]  docs
docs.js.map  2.61 kB       0  [emitted]  docs

ERROR in ./packages/docs/src/index.tsx
Module build failed: (SystemJS) EISDIR: illegal operation on a directory, read
	Error: EISDIR: illegal operation on a directory, read


	Error loading /<path>/node_modules/ts-loader/dist as "./dist" from /<path>/node_modules/ts-loader/index.js
[12:40:26] Finished 'webpack-docs' after 165 ms

@llorca llorca modified the milestones: 1.12.0, 1.13.0 Mar 10, 2017
@glennvorhes
Copy link

I had the problem and resolved it by adding

  "compilerOptions": {
   ...
    "noEmitOnError": true
  },

to my tsconfig.json

It doesn't fail the individual test but the whole thing fails which I think is better than a silent failure.

@giladgray
Copy link
Contributor

oof i wish it were that simple but there seems to be an issue with actually loading ts-loader. see the UnhandledPromiseRejectionWarning (emphasis mine):

(node:69788) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'default' of undefined

suggests some package is expecting an ES6 default export and not finding one.

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

No branches or pull requests

4 participants