Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Ignore optional installs fails to find scrypt.js #297

Closed
dekz opened this issue Feb 4, 2019 · 0 comments · Fixed by #426
Closed

Ignore optional installs fails to find scrypt.js #297

dekz opened this issue Feb 4, 2019 · 0 comments · Fixed by #426

Comments

@dekz
Copy link
Contributor

dekz commented Feb 4, 2019

Adding ganache-core as a dependency and installing all dependencies with:

yarn --frozen-lockfile --ignore-optional

Results in Ganache failing to load as it cannot find the scrypt dependency.

ganache-core-optional λ node
> const ganache = require("ganache-core");
{ Error: Cannot find module 'scrypt.js'
    at call (/Users/jacob/tmp/zz/ganache-core-optional/node_modules/ganache-core/build/webpack:/Ganache/webpack/bootstrap:19:1)
    at Object.__webpack_require__ (/Users/jacob/tmp/zz/ganache-core-optional/node_modules/ganache-core/build/webpack:/Ganache/node_modules/ethereumjs-wallet/index.js:8:16)
    at call (/Users/jacob/tmp/zz/ganache-core-optional/node_modules/ganache-core/build/webpack:/Ganache/webpack/bootstrap:19:1)
    at Object.require (/Users/jacob/tmp/zz/ganache-core-optional/node_modules/ganache-core/build/webpack:/Ganache/external "scrypt.js":1:1)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) code: 'MODULE_NOT_FOUND' }

Expected Behavior

Ganache-core doesn't fail on load if optional dependencies are skipped.

Current Behavior

Ganache-core fails on load if optional dependencies are skipped.

Possible Solution

Steps to Reproduce (for bugs)

  1. Add ganache-core as a dependency
  2. Install packages ignoring optionals: yarn --frozen-lockfile --ignore-optional
  3. Load ganache-core
  4. Cannot find module scrypt.js

Context

We are publishing a lean and mean Docker image and wanting to remove sizeable dependencies which are not required.

Your Environment

  • Version used: 2.2.0
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
  • Server type and version:
  • Operating System and version: Linux
  • Link to your project:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants