Skip to content

Running production builds resolves in tslint errors #374

Closed

Description

@harmjanluth

Running npm run build:prod fails. I can't see how to debug this because the error is very generic.

25% 2/8 build modulesModuleBuildError: Module build failed: Error: Compilation failed due to tslint errors.

at report (/Users/path/node_modules/tslint-loader/index.js:70:11)
at Object.lint (/Users/path/node_modules/tslint-loader/index.js:58:3)
at Object.module.exports (/Users/path/node_modules/tslint-loader/index.js:139:8)
at DependenciesBlock.onModuleBuildFailed (/Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
at nextLoader (/Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
at /Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
at runSyncOrAsync (/Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:173:4)
at nextLoader (/Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
at /Users/path/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
at Storage.finished (/Users/path/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
at /Users/path/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose as oncomplete

Anyone?

Activity

  1. marylin13 commented on Mar 2, 2016

    @marylin13

    +1

  2. fxck commented on Mar 2, 2016

    @fxck

    yea, same, build:dev works, build:prod doesn't

  3. jhuntoo commented on Mar 2, 2016

    @jhuntoo
    Contributor

    The quick temporary fix...

    Change failOnHint to false in the webpack.prod.config.js.

    However the tslint errors should be resolved so this needs fixing.

  4. jhuntoo commented on Mar 2, 2016

    @jhuntoo
    Contributor

    So if you remove the --bail option, the prod build fails (but returns an exit status of 0! bad for CI), and give s you the actual lint errors in the console output.

    I've raised this wbuchwalter/tslint-loader#18 in an effort to resolve why tslint-loader is not outputting the tslint errors. Could it be a webpack issue @gdi2290 ?

  5. jhuntoo commented on Mar 4, 2016

    @jhuntoo
    Contributor

    Update: webpack has a problem whereby errors are not reported correctly when --bail is enabled.

    See webpack/webpack#711

    Meanwhile, I've submitted a workaround PR for tslin-loader, which is not ideal (it will report the first error encountered and not all of them at once), however this will allow webpack to be run with --bail for correct exit-status and to at least see why it's failing.

    wbuchwalter/tslint-loader#19

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions