sebinbenjamin / image-res-generator

A versatile tool for generating icons and splash screens for web and mobile projects. Supports Angular, Ionic, PWA, and more, with seamless SVG and PNG resource generation.
GNU General Public License v3.0
8 stars 5 forks source link

Unable to run tool - fs-extra not found #149

Open daveshirman opened 4 years ago

daveshirman commented 4 years ago

Describe the bug

internal/modules/cjs/loader.js:979
  throw err;
  ^

Error: Cannot find module 'fs-extra'
Require stack:
- /Users/daveshirman/Downloads/image-res-generator-master/src/core/fs-manager.js
- /Users/daveshirman/Downloads/image-res-generator-master/src/index.js
- /Users/daveshirman/Downloads/image-res-generator-master/bin/image-res-generator
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/daveshirman/Downloads/image-res-generator-master/src/core/fs-manager.js:2:12)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1036:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/daveshirman/Downloads/image-res-generator-master/src/core/fs-manager.js',
    '/Users/daveshirman/Downloads/image-res-generator-master/src/index.js',
    '/Users/daveshirman/Downloads/image-res-generator-master/bin/image-res-generator'
  ]
}

To Reproduce Try to run tool at command line on macOS with no options.

Expected behaviour Tool should run without error

Desktop (please complete the following information):

sebinbenjamin commented 4 years ago

Sorry for the trouble. Since this is an npm project (with a dependency on the fs-extra package), you would need to run npm install on the project directory after installing Node.js. I believe that should fix the error you are facing.

I'll update the docs and try to setup executables for Windows, Linux and OsX soon.

daveshirman commented 4 years ago

No need to apologise. Thanks for the reply and explanation.