Question: has no exported member ‘Tapable’

Webpack v4.1.1
Win10 x64

It’s actually the TypeScript compiler that is complaining….

I get the below error, when executing tsc.
I can see that I have @types/tapable --> "version": "0.2.5", installed.

How can I upate this package, it’s not part of my webpack.config.js ?!

node_modules/@types/tapable/index”‘ has no exported member ‘Tapable’.
node_modules/@types/tapable/index”‘ has no exported member ‘HookMap’
……
..

Packages.json of tapable package

{
    "name": "@types/tapable",
    "version": "0.2.5",
    "description": "TypeScript definitions for tapable",
    "license": "MIT",
    "contributors": [
        {
            "name": "e-cloud",
            "url": "https://github.com/e-cloud",
            "githubUsername": "e-cloud"
        }
    ],
    "main": "",
    "repository": {
        "type": "git",
        "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
    },
    "scripts": {},
    "dependencies": {},
    "typesPublisherContentHash": "48644369fadbc86c2d4e3af19df770580677b68e4022f8821c89b0d746d10b20",
    "typeScriptVersion": "2.0"
}

Author: Fantashit

2 thoughts on “Question: has no exported member ‘Tapable’

  1. As a workaround, adding

    "resolutions": {
        "@types/tapable": "1.0.0"
      }
    

    to package.json to force the use of the latest version works for me.

  2. From my point of view, the culprit is the @types/tapable package as the package tagged latest is version 0.2.5 whereas it should be 1.0.0

Comments are closed.