Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #3223
Closed
Open
Issue created Oct 01, 2017 by Administrator@rootContributor

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

Created by: mariuskava

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)

Assignee
Assign to
Time tracking