weepy / kaffeine

Extended Javascript for Pros
http://weepy.github.com/kaffeine/
MIT License
180 stars 16 forks source link

Cannot find module 'optparse' #45

Open caffe23 opened 12 years ago

caffe23 commented 12 years ago

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 commented 6 years ago
  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, https://github.com/npm/npm/issues/13555. I created a pull request to fix that.