Cannot find module 'optparse' #45

Open
caffe23 opened this Issue Jun 24, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@caffe23

caffe23 commented Jun 24, 2012

Hi, I installed Kaffeine with:

npm install kaffeine

and get this error when i try to execute kaffeine

module.js:337
    throw new Error("Cannot find module '" + request + "'");
          ^
Error: Cannot find module 'optparse'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at Object.<anonymous> (/Users/Cesar/node_modules/kaffeine/bin/command.js:4:22)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)
    at Function._load (module.js:311:12)
    at Module.require (module.js:359:17)

is this the way to install it?

additional info:
node -v
v0.6.19

OSX 10.6.8

@Jujhar

This comment has been minimized.

Show comment Hide comment
@Jujhar

Jujhar Dec 22, 2017

  1. You need to do npm install optparse which should add it manually.

  2. However to use Kaffeine you need to clone the current repo as the Kaffeine npm package seems to be dated as it has path.exists problem which can and is fixed in the npm_modules folder by renaming to fs.exists. Either fix that in the node_modules directory or clone the repo and run from within the repo.

  3. After fixing node_modules file:
    node_modules/kaffeine/bin/kaffeine -c index.k
    Or after cloning run:
    bin/kaffeine -c index.k

The optparse issue seems to be because of wildcard issue in package.json as optparse is included in the package.json, npm/npm#13555. I created a pull request to fix that.

Jujhar commented Dec 22, 2017

  1. You need to do npm install optparse which should add it manually.

  2. However to use Kaffeine you need to clone the current repo as the Kaffeine npm package seems to be dated as it has path.exists problem which can and is fixed in the npm_modules folder by renaming to fs.exists. Either fix that in the node_modules directory or clone the repo and run from within the repo.

  3. After fixing node_modules file:
    node_modules/kaffeine/bin/kaffeine -c index.k
    Or after cloning run:
    bin/kaffeine -c index.k

The optparse issue seems to be because of wildcard issue in package.json as optparse is included in the package.json, npm/npm#13555. I created a pull request to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment