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.

Changes to node_modules should trigger recompilation

See original GitHub issue
  1. Add import 'react-router' to index.js
  2. See module not found error
  3. npm install react-router
  4. Still see module not found error
  5. Press “save” in index.js
  6. Now it compiled successfully!

Steps 4 and 5 should not be there. We should find a way to tell webpack that node_modules have changed, and it’s worth trying to recompile.

Ideally we should not have situations where user is forced to stop the bundler and run npm start again. I remember having such issues when switching branches. Hopefully fixing the above use case should be enough, but if you’re familiar with other cases where a restart is required, please write in this thread.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mxstbrcommented, Jul 26, 2016

What about using this? https://github.com/ericclemmons/npm-install-webpack-plugin I think that solves our problem.

0reactions
taioncommented, Jul 26, 2016

I have a vague recollection that this used to “just work” with npm2, but that it stopped working after I upgraded to npm3.

Didn’t have a chance to look into that, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to trigger hot reloading for React when a package in ...
I make a change in a component, webpack recompiles, updates the package in the node_modules of the docs and then a rebuild is...
Read more >
How do I wire up Browsersync and Gulp in my Lando app?
Browsersync open in new window is a nodejs package that synchronizes website changes to the browser. While it can be used for many...
Read more >
TypeScript Compiling with Visual Studio Code
The easiest way to install TypeScript is through npm, the Node.js Package Manager. ... Later in the article, we'll discuss how you can...
Read more >
File Watchers | WebStorm Documentation - JetBrains
Click Yes to activate the File Watcher with the default configuration. ... Changes in these files will invoke the File Watcher either ...
Read more >
Run builds on file changes using watch with npm scripts
1. Add version control to npm packages using git init · 2. Add manifest files to npm packages using npm init · 3....
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