Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Webpack 4: DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead #558

Open
sonicoder86 opened this issue Mar 24, 2018 · 4 comments

Comments

@sonicoder86
Copy link

sonicoder86 commented Mar 24, 2018

When using the loader with Webpack 4 I get this error message: DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead. It works, but always show deprecation message.

The corresponding stack trace:

(node:55845) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at setupWatchRun (/Users/home/node_modules/awesome-typescript-loader/src/instance.ts:367:11)
    at Object.ensureInstance (/Users/home/node_modules/awesome-typescript-loader/src/instance.ts:135:2)
    at compiler (/Users/home/node_modules/awesome-typescript-loader/src/index.ts:47:19)
    at Object.loader (/Users/home/node_modules/awesome-typescript-loader/src/index.ts:16:12)
    at LOADER_EXECUTION (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
    at runSyncOrAsync (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
    at iterateNormalLoaders (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at Array.<anonymous> (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/Users/home/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/Users/home/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
    at /Users/home/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:513:3)

You can print out the stack trace with node --trace-deprecation ./node_modules/.bin/webpack.

@grzegorzjudas
Copy link

grzegorzjudas commented Mar 28, 2018

Yup, new webpack changed the APIs:
webpack/webpack#6568 (comment)

@thescientist13
Copy link

seems like this would be solved as part of an upgrade to #534

@muzea
Copy link

muzea commented Aug 21, 2018

see this commit 149ce3d
Now this problem is solved.

@waspar
Copy link

waspar commented Feb 14, 2019

Still have this warning
node v8.14.1
webpack v4.29.2

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

No branches or pull requests

5 participants