Installing npm package from fork with yarn + webpack - Can't resolve './dist/

Unfortunately, using a repository directly as source can result in execution error. This is because it's not bundled at all, while the package expects an prebuilt version existing in dist. The bundling scripts are often executed before publishing releases to npm.

Some workarounds are:

  • execute the prepublish step in the target directory (this depends on what the project uses)
  • of course, using the published version is the best. create your own package on npm and upload it.

References: npm issue