question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m getting these errors upon building my project:

../node_modules/@types/webpack/index.d.ts(586,28): error TS2507: Type 'typeof "[...]/node_modules/@types/tapable/index"' is not a constructor function type.
../node_modules/@types/webpack/index.d.ts(628,46): error TS2694: Namespace '"[...]/node_modules/@types/tapable/index"' has no exported member 'Plugin'.
../node_modules/@types/webpack/index.d.ts(632,53): error TS2694: Namespace '"[...]/node_modules/@types/tapable/index"' has no exported member 'Plugin'.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

42reactions
shalluscommented, Apr 5, 2018

following up on @jesion npm install @types/tapable@0.2.5 --save-dev fixes the issue

11reactions
lukiffercommented, Mar 21, 2018

This appears to be a result of @types/webpack aggressively getting @types/tapable latest version 1.0.0.

From @types/webpack (2.2.16) package.json:

  "dependencies": {
    "@types/node": "*",
    "@types/tapable": "*",
    "@types/uglify-js": "*"
  },

Which would resolve to semver 1.0.0 according to the list of releases, but as noted above, the “compatible” working version is 0.2.5. When specifying 0.2.5 manually, it works, and the version specification must have been fixed in a more recent version of @types/webpack according to @Brunoon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Understanding Errors - TypeScript
Let's work through some examples to see how they work in practice. Here's an example that produces an error message longer than the...
Read more >
TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them. ... error TS1046: Top-level declarations in .d.ts files must start with either...
Read more >
Complete list of Typescript error codes and their fixes
Looking at the 1.6.2 sources of the compiler, tsc.js , tsserver.js , typescript.js and typescriptServices.js , a variable called ts.
Read more >
Common TypeScript errors and how to fix them - Payton.Codes
The first thing to keep in mind is that often TS will put the actual problem somewhere near the end of the error...
Read more >
ts-error - npm
An extendable Error class that actually works, with TypeScript definition files, supporting old and new style classes and compatibility even ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found