Viewers icon indicating copy to clipboard operation
Viewers copied to clipboard

Issue with webpack(?) - "hot update was not successful"

Open DavidBerger98 opened this issue 4 years ago • 1 comments

I cloned the latest version of the master branch, ran yarn install, then yarn run dev and encountered an error page saying "hot update was not successful". In the console there are a couple errors, one of them saying Uncaught Error: Cannot find module 'dom-helpers/addClass'.

I am using Ubuntu 20.04.3, node 14.18.1, npm 6.14.15, yarn 1.22.17.

It seems to be a problem with webpack. I got the problem fixed by doing the following in .webpack/webpack.base.js: add to module.rules

rules: [...,
  {
    test: /\.js$/,
    exclude: /node_modules(?!(\/|\\)pdfjs-dist)/,
    loader: 'babel-loader',
    options: {
      'presets': ['@babel/preset-env'],
      'plugins': ['@babel/plugin-proposal-optional-chaining']
    }
  }
]

replace resolve.modules with:

modules: ["node_modules"]

See here and here for more.

I am not versed enough in webpack stuff to understand what exactly is going on, but I thought I'd share in case someone has the same error. Maybe someone can check if that fix makes sense.

DavidBerger98 avatar Nov 09 '21 12:11 DavidBerger98

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '22 15:06 stale[bot]

Please review the latest code in the master branch. This issue might have been resolved. If it persists, kindly reopen the issue with updated details.

Try viewer-dev.ohif.org instead of viewer.ohif.org Our viewer.ohif.org is deployed from release branch while viewer-dev.ohif.org is our master branch Read more about branch explanations here https://docs.ohif.org/development/getting-started#developing

sedghi avatar Oct 13 '23 16:10 sedghi