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.

Missing some required dependencies in very simple setup

See original GitHub issue

I have created very simple project as to show very simple setup of typescript, webpack and webpack-dev-server. But unfortunately it doesn’t work with minimal dependencies configured.

What is the current behavior? I have errors when executing webpack-dev-server

ERROR in (webpack)-dev-server/client?http://localhost:8080                                                                              
Module not found: Error: Can't resolve './socket' in 'C:\Work\Projects\sample-app-step1\node_modules\webpack-dev-server\client'         
 @ (webpack)-dev-server/client?http://localhost:8080 4:13-32                                                                            
 @ multi app                                                                                                                            
                                                                                                                                        
ERROR in (webpack)-dev-server/client?http://localhost:8080                                                                              
Module not found: Error: Can't resolve 'strip-ansi' in 'C:\Work\Projects\sample-app-step1\node_modules\webpack-dev-server\client'       
 @ (webpack)-dev-server/client?http://localhost:8080 3:16-37                                                                            
 @ multi app                                                                                                                            
                                                                                                                                        
ERROR in (webpack)-dev-server/client?http://localhost:8080                                                                              
Module not found: Error: Can't resolve 'webpack/hot/emitter' in 'C:\Work\Projects\sample-app-step1\node_modules\webpack-dev-server\clien
t'                                                                                                                                      
 @ (webpack)-dev-server/client?http://localhost:8080 144:19-49                                                                          
 @ multi app                                                                                                                            
                                                                                                                                        
ERROR in ./~/url/url.js                                                                                                                 
Module not found: Error: Can't resolve './util' in 'C:\Work\Projects\sample-app-step1\node_modules\url'                                 
 @ ./~/url/url.js 25:11-28                                                                                                              
 @ (webpack)-dev-server/client?http://localhost:8080                                                                                    
 @ multi app                                                                                                                            
                                                                                                                                        
ERROR in ./~/querystring-es3/index.js                                                                                                   
Module not found: Error: Can't resolve './decode' in 'C:\Work\Projects\sample-app-step1\node_modules\querystring-es3'                   
 @ ./~/querystring-es3/index.js 3:33-52                                                                                                 
 @ ./~/url/url.js                                                                                                                       
 @ (webpack)-dev-server/client?http://localhost:8080                                                                                    
 @ multi app                                                                                                                            
                                                                                                                                        
ERROR in ./~/querystring-es3/index.js                                                                                                   
Module not found: Error: Can't resolve './encode' in 'C:\Work\Projects\sample-app-step1\node_modules\querystring-es3'                   
 @ ./~/querystring-es3/index.js 4:37-56                                                                                                 
 @ ./~/url/url.js                                                                                                                       
 @ (webpack)-dev-server/client?http://localhost:8080                                                                                    
 @ multi app                                                                                                                            

If the current behavior is a bug, please provide the steps to reproduce. Repository: https://github.com/megaboich/sample-app-step1

What is the expected behavior? Just work without errors

Please mention your webpack and Operating System version. Windows 10

{
  "name": "sample-app-step1",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "build": "webpack",
    "start": "webpack-dev-server"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "html-webpack-plugin": "2.24.1",
    "ts-loader": "1.3.3",
    "typescript": "2.1.4",
    "webpack": "2.2.0-rc.1",
    "webpack-dev-server": "2.2.0-rc.0"
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:16

github_iconTop GitHub Comments

345reactions
megaboichcommented, Dec 21, 2016

Ok, I found what caused the issue. It was webpack configuration. It was:

    resolve: {
        extensions: ['.ts'],
    },

Missing .js is critical So, correct one is:

    resolve: {
        extensions: ['.ts', '.js'],
    },
25reactions
athergeekcommented, May 26, 2018

I had the same issue, just a little typo was giving me headaches. I wrote ‘js’ instead of ‘.js’

Wrong resolve: { extensions: [‘.ts’, ‘js’] // Missing dot },

Correct resolve: { extensions: [‘.ts’, ‘.js’] },

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Pandas - Missing required dependencies ['numpy'] 1
On Windows 10 Anaconda3-5.3.0-Windows-x86_64 I had the Missing required dependencies ['numpy'] ... In a way, numpy is a dependency of the pandas library....
Read more >
Fix: Couldn't install dependency error | Valorant Guide
Want to play Valorant, but receiving an error about needing to contact support to fix a dependency error? Well, this video covers the...
Read more >
How to identify missing dependencies when installing from ...
Method 1: Read the requirements, compare with the list of installed packages. Method 2: Run the configure script. It will fail on missing...
Read more >
Solution Import - Missing Dependencies
I am trying to import my solution into a new environment and am getting the below error: There are missing dependencies. Install the....
Read more >
How to Install and Correct Dependencies Issues in Ubuntu
Let's review what dependencies are and why they are required. We all have, at one point or another, most certainly seen a message...
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