Skip to content

Commit ff37334

Browse files
elliottsjpiotr-oles
authored andcommitted
fix: add @types dependencies for tapable + webpack
Fix this error when using strict package managers like pnpm/yarn pnp: ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(1,26): TS7016: Could not find a declaration file for module 'webpack'. '/path/to/project/node_modules/.registry.npmjs.org/webpack/4.30.0/node_modules/webpack/lib/webpack.js' implicitly has an 'any' type. Try `npm install @types/webpack` if it exists or add a new declaration (.d.ts) file containing `declare module 'webpack';` ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(48,209): TS7016: Could not find a declaration file for module 'tapable'. '/path/to/project/node_modules/.registry.npmjs.org/tapable/1.1.3/node_modules/tapable/lib/index.js' implicitly has an 'any' type. Try `npm install @types/tapable` if it exists or add a new declaration (.d.ts) file containing `declare module 'tapable';` ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(48,253): TS7016: Could not find a declaration file for module 'tapable'. '/path/to/project/node_modules/.registry.npmjs.org/tapable/1.1.3/node_modules/tapable/lib/index.js' implicitly has an 'any' type. Try `npm install @types/tapable` if it exists or add a new declaration (.d.ts) file containing `declare module 'tapable';`
1 parent e9ee9ad commit ff37334

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
]
9999
},
100100
"dependencies": {
101+
"@types/tapable": "^1.0.4",
102+
"@types/webpack": "^4.4.19",
101103
"babel-code-frame": "^6.22.0",
102104
"chalk": "^2.4.1",
103105
"chokidar": "^2.0.4",
@@ -115,7 +117,6 @@
115117
"@types/minimatch": "^3.0.1",
116118
"@types/node": "^8.10.38",
117119
"@types/semver": "^5.5.0",
118-
"@types/webpack": "^4.4.19",
119120
"chai": "^4.2.0",
120121
"commitlint": "^7.5.2",
121122
"css-loader": "0.28.11",

yarn.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,10 @@
381381
version "5.5.0"
382382
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45"
383383

384-
"@types/tapable@*":
384+
"@types/tapable@*", "@types/tapable@^1.0.4":
385385
version "1.0.4"
386386
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
387+
integrity sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==
387388

388389
"@types/uglify-js@*":
389390
version "3.0.4"

0 commit comments

Comments
 (0)