Closed adidahiya closed 6 years ago
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.
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.
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
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.
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.
Discovered in https://github.com/palantir/blueprint/pull/775#issuecomment-284160519
Current compilation failures are fixed in https://github.com/palantir/blueprint/pull/779, but we need to fix the build system to fail on
tsc
errors. I tried to get this working using solutions from https://github.com/TypeStrong/ts-loader/issues/108 but did not succeed. A quick and dirty fix would be to runtsc -p packages/<name>/test
commands in the verify script or ingulp check
. Or we could try upgrading to webpack 2 (shouldn't be too hard; I just did it on another project).