Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hello World example doesn't work, generates Cannot find module 'promised-io/lib/promise' error #52

Closed
xgeoff opened this Issue Aug 24, 2012 · 23 comments

Comments

Projects
None yet
4 participants

xgeoff commented Aug 24, 2012

I followed the directions to setup bogart using npm. Copied the 'hello world' example into an app.js file and ran it with node. I get the error:

Cannot find module 'promised-io/lib/promise'

I assumed that npm would install promised-io as a dependency. Just in case I used npm to install 'promised-io' but it still generates the same error.

Owner

nrstott commented Aug 24, 2012

Thanks, I will check it out.

On Fri, Aug 24, 2012 at 1:23 PM, xgeoff notifications@github.com wrote:

I followed the directions to setup bogart using npm. Copied the 'hello
world' example into an app.js file and ran it with node. I get the error:

Cannot find module 'promised-io/lib/promise'

I assumed that npm would install promised-io as a dependency. Just in case
I used npm to install 'promised-io' but it still generates the same error.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52.

Contributor

bennlich commented Aug 29, 2012

I'm getting the same error when I try to deploy my app on cloudno.de or nodejitsu. Works fine locally though.

Owner

nrstott commented Aug 29, 2012

I've actually run into this issue before locally, even though it is currently working for me. At one point I was able to simply remove and reinstall promised-io without changing anything in my package.json and it got a different version of promised-io. I believe the dojo registry sometimes delivers a different version. Dojo maintains its own registry that is somehow linked to npm, it appears, correct me someone from dojo if I'm wrong about all of this.

My employees have also experienced this. We will npm install and sometimes the promised-io will want the /lib/ there and sometimes it wont. It's as though the incorrect version is delivered sporadically.

Contributor

bennlich commented Aug 29, 2012

The cloudno.de server was running v0.6.17, and the nodejitsu server was
running 0.8.x. In both cases the promised-io package was supposedly
installed without error. Dunno. Was bogart updated recently? I'd been
running it perfectly for several months on cloudnode.

--Benny

On Wednesday, August 29, 2012, Nathan wrote:

Ah, that could explain a lot because it's working fine locally for me as
well. It may be node.js version.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-8131583.

Owner

nrstott commented Aug 29, 2012

No, Bogart was not recently updated. I really think that it will turn out to be that the wrong version of promised-io is being installed by npm.

Contributor

bennlich commented Aug 29, 2012

Ah, k. I'll check that out. If bogart is a dependency of the web app,
there's no need to include promised-io as an additional dependency since
its already listed in bogart's package, right?

On Wednesday, August 29, 2012, Nathan wrote:

No, Bogart was not recently updated. I really think that it will turn out
to be that the wrong version of promised-io is being installed by npm.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-8134932.

Owner

nrstott commented Aug 29, 2012

The backstory is this, at one point kris zyp decided to move everything from /lib/ in his projects to the root. I pinned via package.json the correct version of promised-io for Bogart. However, as I mentioned, I have had times when an npm install installed the wrong version on a machine though it reported it as the correct one. On the same machine I've been able to delete that promised-io from the npm modules directory and reinstall via npm install and get the right version. Bot the right and wrong versions report the same version number. In conclusion, there is something whacky with the promised-io package and I have a suspicion it has to do with the fact that dojo maintains its own registry for packages that is just linked to npms.

Owner

nrstott commented Aug 29, 2012

Please try to reinstall bogart with npm install and see if the problem clears up. If it doesn't, you should probably download the appropriate version of promised-io via git and just overwrite the one in your node modules directory with it.

Contributor

bennlich commented Aug 29, 2012

Ah, k. Will do. Thanks.

On Wednesday, August 29, 2012, Nathan wrote:

Please try to reinstall bogart with npm install and see if the problem
clears up. If it doesn't, you should probably download the appropriate
version of promised-io via git and just overwrite the one in your node
modules directory with it.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-8139494.

Owner

nrstott commented Aug 30, 2012

Let me know if that works for you. If you put the correct version of promised-io from git in your node modules directory and are still having issues, I will try to help resolve them.

I am just now having this problem locally. It was the first time installing node and npm on my MacBook (using the .pkg), and running npm install bogart. Copying and pasting the hello world sample and running it yields:

module.js:340
    throw err;
          ^
Error: Cannot find module 'promised-io/lib/promise'
    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. (/Users/myuser/Projects/myproject/node_modules/bogart/lib/bogart.js:3:18)

I did a find-all-replace for promised-io/lib/promise and replaced it with promised-io/promise and all seemed to work.

Owner

nrstott commented Sep 6, 2012

Thanks Matthew. That's odd though because the version of promised-io I
pinned should require the /lib. I will just update this package so that
everything works as expected since this is obviously causing a lot of
people problems, or if youd just like to update the package.json inaddition
to the replace you did and commit it and send me a pull request, I'd be
happy to merge it. If not, I'll put it on my task list for this weekend.

On Wed, Sep 5, 2012 at 9:16 PM, Matthew Moore notifications@github.comwrote:

I did a find-all-replace for promised-io/lib/promise and replaced it with
promised-io/promise and all seemed to work.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-8320314.

I probably won't get to that before the weekend; sorry!

Contributor

bennlich commented Sep 6, 2012

Thank Matthew + Nathan. I could do this before the weekend if you want. Or is it bad form to commit fixed bugs other people caught? I'm not an experienced githubber.

Owner

nrstott commented Sep 6, 2012

Certainly not bad form. We're a community. New contributors welcome!

On Thu, Sep 6, 2012 at 1:41 AM, Benny Lichtner notifications@github.comwrote:

Thank Matthew + Nathan. I could do this before the weekend if you want. Or
is it bad form to commit fixed bugs other people caught? I'm not an
experienced githubber.


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-8323879.

Contributor

bennlich commented Sep 6, 2012

Okey dokes! Pull request sent.

Contributor

bennlich commented Dec 9, 2012

This should be closed, right?

@nrstott nrstott closed this Dec 9, 2012

@ghost

ghost commented Jan 11, 2013

I have got error "Error: Cannot find module 'promised-io/lib/promise' " please help me fix it

Owner

nrstott commented Jan 11, 2013

What version of bogart are you on? Did you npm install it?

On Fri, Jan 11, 2013 at 4:35 AM, dondinh notifications@github.com wrote:

I have got error "Error: Cannot find module 'promised-io/lib/promise' "
please help me fix it


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-12139102.

@ghost

ghost commented Jan 14, 2013

When I run app.js, I got error:
Error: Cannot find module 'promised-io/lib/promise'
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. (/var/www/dondinh/CouchDB/blog/node_modules/couchdb/lib/couchdb.js:2:20)
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.require (module.js:362:17)

I install by npm and version of Bogart is 0.3.43.

Could you show me some more about settings file and structure of database Blog?
Thank you very much :)

@ghost

ghost commented Jan 14, 2013

that is a information I have got when install couchdb:
couchdb@0.3.8 node_modules/couchdb
├── promised-io@0.2.3
└── request@2.2.9

Owner

nrstott commented Jan 15, 2013

I've seen this error many times with the promised-io/lib/promise. It seems
that sometimes when you npm install you get a different version than the
one requested and reported. In both cases it reports the same version of
promised-io but in one the files are beneath a /lib/ dir and in the other
they are not. I have actually corrected this very problem by removing and
re npm installing bogart in the same directory. When we move to 0.4,
hopefully this problem will be resolved once and for all. If you just pull
from github then you should never experience it.

On Mon, Jan 14, 2013 at 2:59 AM, dondinh notifications@github.com wrote:

that is a information I have got when install couchdb:
couchdb@0.3.8 node_modules/couchdb
├── promised-io@0.2.3
└── request@2.2.9


Reply to this email directly or view it on GitHubhttps://github.com/nrstott/bogart/issues/52#issuecomment-12210576.

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