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.

5.40 breaks type of webpack-dev-server

See original GitHub issue

Bug report

What is the current behavior?

image

If the current behavior is a bug, please provide the steps to reproduce.

  1. install webpack and @types/webpack-dev-server
  2. create a variable of type Configuration fromwebpack
  3. Try to access its devServer property

What is the expected behavior?

For webpack 3.38.1, this works

image

Other relevant information: webpack version: 5.40.0 Node.js version: v16.3.0 Operating System: macOS 11.4 Additional tools: TypeScript 4.3.2 and @types/webpack-dev-server@3.11.1, @types/webpack-dev-server@3.11.4 also reproduces this issue

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sokracommented, Jul 16, 2021

@types/webpack-dev-server extends the webpack typings with the devServer property:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/415b6859c78cc7fe694fb12a10ea88f1fadfe958/types/webpack-dev-server/index.d.ts#L347-L355

For this to work webpack must not provide a devServer property in Configuration.

This seems fine and nothing has changed between these version.

  • Make sure you don’t have @types/webpack installed (yarn why/npm ls @types/webpack)
  • Make sure you don’t have webpack installed below @types/webpack-dev-server (yarn why/npm ls webpack)
  • Make sure you don’t have multiple versions of webpack or @types/webpack-dev-server installed
0reactions
webpack-botcommented, Nov 3, 2021

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dev server breaks library entry type #4469 - GitHub
Bug report We have an app with two entries - the main one for the app, and a second entry for a library....
Read more >
DevServer - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
devServer.watchFiles breaks Hot Module Replacement (HMR ...
I'm following a Udemy course and trying to get HMR running with webpack version 5.67.0 and webpack-dev-server 4.7.3, but it does not work....
Read more >
@types/webpack-dev-server - npm
Stub TypeScript definitions entry for webpack-dev-server, which provides its own types definitions. Latest version: 4.7.2, last published: a ...
Read more >
How I solved and debugged my Webpack issue through trial ...
import React from 'react';import PropTypes from 'prop-types'; ... And it turned out that the webpack-dev-server has been in maintenance mode ...
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