Skip to content

Bundling problem with webpack5 on windows #8

@barisusakli

Description

@barisusakli

I am trying to use this module with webpack 5.72.1 on windows. My client side code is simply

const uuid4 = require('uuid4');
console.log(uuid4.uuid4());

When I try to bundle I get this error.

ERROR in ./build/public/src/app.js 12:14-30
Module not found: Error: Can't resolve 'uuid4' in 'C:\Users\Baris\Desktop\github\nodebb_master\build\public\src'

If I modify this module's package.json like below it works without issues.
before

"browser": {
    "./index.js": "browser.js",
    "./index.mjs": "browser.mjs"
  },

after

"browser": {
    "./index.js": "./browser.js",
    "./index.mjs": "./browser.mjs"
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions