Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start does not detect modifications in src/*/node_modules #3223

Closed
mariuskava opened this issue Oct 1, 2017 · 3 comments
Closed

npm start does not detect modifications in src/*/node_modules #3223

mariuskava opened this issue Oct 1, 2017 · 3 comments

Comments

@mariuskava
Copy link

Is this a bug report?

yes

Can you also reproduce the problem with npm 4.x?

yes

Which terms did you search for in User Guide?

node_modules, watch, absolute, relative, import, webpack
(also searched the change logs)

Environment

  1. node -v: v8.6.0
  2. npm -v: 4.6.1 and 5.4.2
  3. yarn --version (if you use Yarn): ---
  4. npm ls react-scripts (if you haven’t ejected):
    └── react-scripts@1.0.14

(and I also tried react-scripts@0.9.5 and react-scripts@1.0.0 versions. There is no problem with 0.9.5)

  1. Operating system: Windows 8.1 and Ubuntu xenial
  2. Browser and version (if relevant): not relevant

Steps to Reproduce

  1. create-react-app test
  2. create file at test/src/node_modules/Test.js with: console.log("Test.js imported");
  3. at test/src/index.js: import "Test.js";
  4. cd test && npm start
  5. modify test/src/node_modules/Test.js;
  6. modify test/src/index.js;

Expected Behavior

at step 5. the project should recompile.
at step 6. the project should recompile with modified Test.js file.

This was the behavior with react-scripts@0.9.5-0.8.4. Downgrading fixes the issue.
Braking change was not reported on 0.9.5 -> 1.0.0.

Actual Behavior

at step 5. the project is not recompiled.
at step 6. the project is recompiled, but without Test.js modifications.

The project compiles without errors initially on npm start.

Reproducible Demo

create-react-app test
cd test
mkdir src/node_modules
echo "console.log("Test.js imported");" > src/node_modules/Test.js
mv src/index.js src/index.js.old
echo "import "Test.js";" > src/index.js
cat src/index.js.old >> src/index.js
rm src/index.js.old
npm start

(then make modifications on Test.js file)

@Timer
Copy link
Contributor

Timer commented Oct 1, 2017

#2760

@Timer
Copy link
Contributor

Timer commented Oct 2, 2017

We'll need someone to take over #2760 and champion it. 😄

@Timer Timer added this to the 1.0.x milestone Oct 2, 2017
Timer pushed a commit that referenced this issue Oct 3, 2017
* Allow the dev server to watch for changes in src/node_modules

* fix eslint error

* fix broken regex

* handle trailing slash edge case for file paths

Closes #2760
Fixes #3223
@gaearon gaearon modified the milestones: 1.0.x, 1.0.15 Oct 28, 2017
@gaearon
Copy link
Contributor

gaearon commented Oct 30, 2017

zmitry pushed a commit to zmitry/create-react-app that referenced this issue Aug 14, 2018
* Allow the dev server to watch for changes in src/node_modules

* fix eslint error

* fix broken regex

* handle trailing slash edge case for file paths

Closes facebook#2760
Fixes facebook#3223
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
LishuGupta652 pushed a commit to LishuGupta652/create-react-app-1 that referenced this issue Oct 8, 2024
* Allow the dev server to watch for changes in src/node_modules

* fix eslint error

* fix broken regex

* handle trailing slash edge case for file paths

Closes facebook#2760
Fixes facebook#3223
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants