Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

When using Electron, the symlinking strategy will still load bitcore-lib multiple times. #61

Description

@braydonf

When using Electron, the symlinking strategy will still load bitcore-lib multiple times, and will throw an error from the versionGuard.

Here is the dependency and file structure to reproduce:

app.js
index.js (<- requires bitcore-lib and bitcore-node)
node_modules/bitcore-lib (<- symlink to ~/bitcore-lib)
node_modules/bitcore-node (<- also requires bitcore-lib)
node_modules/bitcore-node/node_modules/bitcore-lib (<- symlink to ~/bitcore-lib)
node_modules/electron-prebuilt
package.json

require('bitcore-lib') with Electron will load bitcore-lib again even though it's a symlink, this is different than when using Node.js alone, likely because the cached path is in reference to the symlink instead of the final path.

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