Skip to content

Server doesn't reload module after the second module update. #4363

@PavelTurk

Description

@PavelTurk

Bug report

I have two projects a and b. Project b uses project a with this way:

"dependencies": {
    "@foo/a": "^0.1.0",
    ...
 },

In project b .npmrc I have

@foo:registry=http://localhost:4873

To get the bug the following steps are required:

  • In project b: npm run serve -- --port 8888
  • In project a - some modifications, code building, uploading it to registry.
  • In project b: npm update @foo/a - everything is OK
  • In project a - some modifications, code building, uploading it to registry.
  • In project b: npm update @foo/a - ERROR:

Compiled with problems:
ERROR in ./node_modules/@foo/a/dist/index.common.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: ENOENT: no such file or directory, open '/home/pavel/b/node_modules/@foo/a/dist/index.common.js'

However, I checked, this file '/home/pavel/b/node_modules/@foo/a/dist/index.common.js exists and is not broken.
So, the problem is that after the first npm update server works, however, after the second one it doesn't.

Actual Behavior

Module must be updated after 2,3,4 ...N cases.

Expected Behavior

Server must processes all module updates not only the first one.

How Do We Reproduce?

Follow the steps above with any project.

Please paste the results of npx webpack-cli info here, and mention other relevant information


  Webpack-dev-server:  4.7.4. 

  System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (8) x64 AMD Ryzen 5 1400 Quad-Core Processor
    Memory: 1.79 GB / 15.59 GB
  Binaries:
    Node: 17.3.0 - /usr/bin/node
    Yarn: 1.22.17 - /usr/bin/yarn
    npm: 8.3.0 - /usr/bin/npm
  Browsers:
    Firefox: 95.0.1
  Packages:
    less-loader: 7.3.0 => 7.3.0 
    sass-loader: ^10.0.0 => 10.2.1 
    vuetify-loader: ^2.0.0-alpha.0 => 2.0.0-alpha.9 
    webfontloader: ^1.0.0 => 1.6.28

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions