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

Webpack 5: deprecation warning [DEP_WEBPACK_MODULE_ERRORS] #1194

Closed
sanex3339 opened this issue Oct 11, 2020 · 2 comments · Fixed by #1195
Closed

Webpack 5: deprecation warning [DEP_WEBPACK_MODULE_ERRORS] #1194

sanex3339 opened this issue Oct 11, 2020 · 2 comments · Fixed by #1195

Comments

@sanex3339
Copy link
Contributor

Expected Behaviour

No deprecation warning

Actual Behaviour

(node:69430) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead)

Steps to Reproduce the Problem

PR with the error:
javascript-obfuscator/javascript-obfuscator#776

Full trace:

(node:69499) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead)
    at Object.reportTranspileErrors (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/ts-loader/dist/instances.js:263:24)
    at successLoader (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/ts-loader/dist/index.js:28:17)
    at Object.loader (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/ts-loader/dist/index.js:24:5)
    at LOADER_EXECUTION (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
    at runSyncOrAsync (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
    at iterateNormalLoaders (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
    at Array.<anonymous> (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/loader-runner/lib/LoaderRunner.js:224:4)
    at runCallbacks (/Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:24:49)
    at /Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:194:4
    at /Users/sanex/WebstormProjects/javascript-obfuscator/node_modules/webpack/node_modules/graceful-fs/graceful-fs.js:123:16

Location of a Minimal Repository that Demonstrates the Issue.

javascript-obfuscator/javascript-obfuscator#776

@johnnyreilly
Copy link
Member

Thanks for the report @sanex3339 - if you'd like to submit a PR to resolve this we'd be very grateful.

In terms of support, ts-loader aims to continue supporting webpack 4 and 5 for now, (just as we've supported multiple versions of webpack in the past). So any patch should support webpack 4 and webpack 5.

You can see a feature testing approach in the codebase that does this here: https://github.com/TypeStrong/ts-loader/blob/master/src/after-compile.ts#L253

Feel free to reach out for help - particularly when it comes to the tests; we're happy to collaborate on PRs ❤️🌻

sanex3339 added a commit to sanex3339/ts-loader that referenced this issue Oct 12, 2020
johnnyreilly pushed a commit that referenced this issue Oct 13, 2020
* Fixed deprecation warnings on webpack@5.
Fixed #1194

* Removed redundant `!!` in `module.addError` checks

* Version update to 8.0.5
This was referenced Mar 11, 2021
@allen-munsch
Copy link

yarn add ts-loader@8.0.5

Worked for me using ^5.52.0

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

Successfully merging a pull request may close this issue.

3 participants