Cannot find module
brianegan opened this issue · 7 comments
Howdy!
When I run:
dox-foundation --source myFolderOJavaScript --target docs
I get the following error:
module.js:340
throw err;
^
Error: Cannot find module '/Users/began/workspace/abu/frontend/rebar/js/package'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/usr/local/lib/node_modules/dox-foundation/bin/dox-foundation:74:29)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
When I manually edited /usr/local/lib/node_modules/dox-foundation/lib/dox-foundation.js, I removed line 11:
pkg = require('../package'),
And then replaced:
exports.name = pkg.name;
with
exports.name = "dox-foundation";
and
exports.version = pkg.version;
with
exports.version = "0.4.2";
It all worked fine. Not sure how best to fix this ,but wanted to submit a bug report and how I fixed it on my end.
Thanks!
Brian
Hey Brian, Thanks for the bug report. I'll take a look at it. Just a quick
question though, what type of system are you on?
- Matt McManus
On Wed, Jan 30, 2013 at 5:04 PM, Brian Egan notifications@github.comwrote:
Howdy!
When I run:
dox-foundation --source myFolderOJavaScript --target docs
I get the following error:
module.js:340
throw err;
^
Error: Cannot find module
'/Users/began/workspace/abu/frontend/rebar/js/package'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.
(/usr/local/lib/node_modules/dox-foundation/bin/dox-foundation:74:29)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)When I manually edited
/usr/local/lib/node_modules/dox-foundation/lib/dox-foundation.js, I removed
line 11:pkg = require('../package'),
And then replaced:
exports.name = pkg.name;
with
exports.name = "dox-foundation";
and
exports.version = pkg.version;
with
exports.version = "0.4.2";
It all worked fine. Not sure how best to fix this ,but wanted to submit a
bug report and how I fixed it on my end.Thanks!
Brian—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28.
Thanks Matt! I'm on a Mac Book Pro Early 2011, running Mountain Lion. Thanks for the help :)
Hey Brian, this is a strange one. I'm not sure why it's looking for a package.json file in /Users/began/workspace/abu/frontend/rebar/js/package
. Are you using 0.4.3
? I can't seem to replicate this.
I have the same issue on version 0.4.4 used through grunt-dox or not.
Hi Matt,
I was using 0.8.8, upgraded to 0.8.19, and still getting the error. I tried it on my home computer instead of work, and it seems to be fine there... not sure what the difference is, but if I figure it out I'll let ya know!
Thanks for taking a look at it :)
Best,
Brian
@douglaslassance & @brianegan, can you post the command you ran to install dox-foundation and then the command you are running when you get the error?
npm install -g dox-foundation
dox-foundation --source src --target docs
All that from the appropriate folder of course.
By the way, I am also running Mountain Lion and installed Node and NPM using MacPorts.