Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'fibres' on Meteor@1.2 #26

Closed
daveeel opened this issue Sep 24, 2015 · 32 comments
Closed

Error: Cannot find module 'fibres' on Meteor@1.2 #26

daveeel opened this issue Sep 24, 2015 · 32 comments

Comments

@daveeel
Copy link

daveeel commented Sep 24, 2015

Trying to run the demo locally. Got error:

Error: Cannot find module 'fibers'

Tried npm install fibres both globally & locally but to no avail. Any advice?

@dr-dimitru
Copy link
Member

@daveeel on which Operating System you are expecting this issue?

@dr-dimitru
Copy link
Member

@daveeel try to install ostrio:neo4jdriver@1.0.2-fiber

@daveeel
Copy link
Author

daveeel commented Sep 24, 2015

I am on latest OS X.

Shall try to install the recommended package and report back later today.

@dr-dimitru
Copy link
Member

Currently, I can't build -fiber version for OS X, due to this: Error from build farm: Sorry, no machines available now. Try again later. [try-again-later] on Meteor's end.

Honestly - I thought you are on Win (sorry). But I have no issues with ostrio:neo4jdriver@1.0.2 on Mac OS X, as fibres lib build-into Mac's Meteor version.

Could you please describe step-by-step from initiation an app to this error?

@daveeel
Copy link
Author

daveeel commented Sep 25, 2015

My OS X Yosemite is 10.10.5 (14F27) . Nothing special, just standard steps.
To verify again, I just tried a clean git clone https://github.com/VeliovGroup/ostrio-neo4jdriver.git
Go to "demo" folder and run "meteor" directly, got the following error:

=> Started proxy.
=> Started MongoDB.
W20150925-11:16:47.840(8)? (STDERR)
W20150925-11:16:47.841(8)? (STDERR) /Users/daveel/p/learning/neo4j/ostrio-neo4jdriver/demo/.meteor/local/build/programs/server/boot.js:283
W20150925-11:16:47.841(8)? (STDERR) }).run();
W20150925-11:16:47.841(8)? (STDERR)    ^
W20150925-11:16:47.841(8)? (STDERR) Error: Cannot find module 'fibers'
W20150925-11:16:47.841(8)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20150925-11:16:47.841(8)? (STDERR)     at Function.Module._load (module.js:280:25)
W20150925-11:16:47.841(8)? (STDERR)     at Module.require (module.js:364:17)
W20150925-11:16:47.841(8)? (STDERR)     at require (module.js:380:17)
W20150925-11:16:47.841(8)? (STDERR)     at Object.<anonymous> (/Users/daveel/.meteor/packages/ostrio_neo4jdriver/.1.0.2.bvf8c4++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:33:11)
W20150925-11:16:47.841(8)? (STDERR)     at Object.<anonymous> (/Users/daveel/.meteor/packages/ostrio_neo4jdriver/.1.0.2.bvf8c4++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:62:4)
W20150925-11:16:47.842(8)? (STDERR)     at Module._compile (module.js:456:26)
W20150925-11:16:47.842(8)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20150925-11:16:47.842(8)? (STDERR)     at Module.load (module.js:356:32)
W20150925-11:16:47.842(8)? (STDERR)     at Function.Module._load (module.js:312:12)
=> Exited with code: 8

Then tried

meteor add ostrio:neo4jdriver@1.0.2-fiber

same result ...

Thanks.

@dr-dimitru
Copy link
Member

The:

meteor add ostrio:neo4jdriver@1.0.2-fiber

Should return error: No compatible binary build found for this package. Contact the package author and ask them to publish it for your platform. as it wasn't builded for Mac OS X, until this moment (just got access to build farm).

This means there is something wrong.

Could you locally in demo folder run meteor reset, then: meteor add ostrio:neo4jdriver@1.0.2 and try to start app: meteor?

If this not going to work - run: meteor add ostrio:neo4jdriver@1.0.2-fiber and try to run app: meteor

Make sure meteor is in v1.2: meteor --version

This is really weird because meteor comes with node-fibres in a core, so there is no need to require this lib.

@daveeel
Copy link
Author

daveeel commented Sep 25, 2015

My meteor version is Meteor 1.2.0.1. When I try

meteor add ostrio:neo4jdriver@1.0.2-fiber

I got:

Currently using ostrio:neo4jdriver with version constraint 1.0.2.
The version constraint will be changed to 1.0.2-fiber.

Don't see your expected error.

Then I tried:

meteor reset
meteor add ostrio:neo4jdriver@1.0.2

Got this:

Currently using ostrio:neo4jdriver with version constraint 1.0.2-fiber.
The version constraint will be changed to 1.0.2.

Run "meteor" -> got the same error previous reported

Then tried again

meteor add ostrio:neo4jdriver@1.0.2-fiber
meteor

Still the same

Error: Cannot find module 'fibers'

@GeorgeStrakhov
Copy link

+1 same problem here.
Latest Mac Yosemite 10.10.5 (14F27);
Meteor 1.2.0.2

@dr-dimitru
Copy link
Member

@GeorgeStrakhov which versions do you tried to use?

@GeorgeStrakhov
Copy link

@dr-dimitru
tried both standard and -fiber versions. no luck. here is what I get with a fresh app that has nothing else in it, trying to do meter run after successfully executing meteor add ostrio:neo4jdriver:

W20151022-21:37:52.363(8)? (STDERR)
W20151022-21:37:52.365(8)? (STDERR) /Users/gs/.meteor/packages/meteor-tool/.1.1.9.tf28uq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151022-21:37:52.365(8)? (STDERR)                         throw(ex);
W20151022-21:37:52.365(8)? (STDERR)                               ^
W20151022-21:37:52.365(8)? (STDERR) Error: Cannot find module 'fibers'
W20151022-21:37:52.365(8)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20151022-21:37:52.365(8)? (STDERR)     at Function.Module._load (module.js:280:25)
W20151022-21:37:52.365(8)? (STDERR)     at Module.require (module.js:364:17)
W20151022-21:37:52.365(8)? (STDERR)     at require (module.js:380:17)
W20151022-21:37:52.365(8)? (STDERR)     at Object.<anonymous> (/Users/gs/.meteor/packages/ostrio_neo4jdriver/.1.0.2.1udqw3r++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:33:11)
W20151022-21:37:52.365(8)? (STDERR)     at Object.<anonymous> (/Users/gs/.meteor/packages/ostrio_neo4jdriver/.1.0.2.1udqw3r++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:62:4)
W20151022-21:37:52.366(8)? (STDERR)     at Module._compile (module.js:456:26)
W20151022-21:37:52.366(8)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20151022-21:37:52.366(8)? (STDERR)     at Module.load (module.js:356:32)
W20151022-21:37:52.366(8)? (STDERR)     at Function.Module._load (module.js:312:12)
=> Exited with code: 8

help much appreciated.

@dr-dimitru
Copy link
Member

Strange, have you tried npm install fibers in app directory?

@GeorgeStrakhov
Copy link

@dr-dimitru
tried just now. both before and after doing meteor add ostrio:neo4jdriver. still no luck.
even npm install -g fibers didn't help...

FYI (in case its relevant): Node v0.12.7

@dr-dimitru
Copy link
Member

Meteor uses it's own node.js version and build.
To properly build and install npm packages you have to use nvm to install right node.js version, then rebuild npm packages and add new one

@dr-dimitru
Copy link
Member

But I have no idea why its happens

  1. Meteor comes with fibers
  2. One of the packages has fibers dependency another not

It must work

@GeorgeStrakhov
Copy link

@dr-dimitru
strange indeed. I am using NVM and tried installing in the app directory before trying -global.
will keep playing.

@dr-dimitru
Copy link
Member

@GeorgeStrakhov tweeted for help

@dr-dimitru
Copy link
Member

@GeorgeStrakhov any news on your end?

@dr-dimitru
Copy link
Member

Hi guys @GeorgeStrakhov @daveeel ,
Any news on your end?

@daveeel
Copy link
Author

daveeel commented Nov 28, 2015

I encountered similar errors while working on other Meteor projects. Most of the time they were resulted from other code errors. Just somehow showing the error of this thread. Shall give it a try again later tonight.

@daveeel
Copy link
Author

daveeel commented Nov 29, 2015

@dr-dimitru , I re-cloned this repo, got "meteor update" with latest updates, then tried all combinations as you suggested. It's a pity I still got the same issue. I even created a clean meteor project and installed your package. Still no luck :(

@dr-dimitru
Copy link
Member

@daveeel which version of driver?
It has:

  • ostrio:neo4jdriver@1.0.2-fiber
  • ostrio:neo4jdriver@1.0.2

@daveeel
Copy link
Author

daveeel commented Nov 29, 2015

I tried both and have same error. I also tried to install the fiber npm version globally, locally and inside the .meteor/local/build/server. Got slightly diff error msg. But still can't run both your demo project & my blank project.

@daveeel
Copy link
Author

daveeel commented Nov 29, 2015

By the way, after messing around with different combinations of install & uninstall, I found that my other Meteor project is not working anymore with the same Fibers not found error...

Then I tried "curl https://install.meteor.com/ | sh" which removes and reinstalls Meteor environment. Now my other Meteor project work again without error.

Next I repeated all tests to your demo and new blank Meteor project + ostrio:neo4jdriver@1.0.2-fiber ( also without -fiber ). Too bad the Fiber issue is still there. Guess we could conclude that the error is directly related the package, at least on Mac. Just we don't know what is the issue yet ...

@daveeel
Copy link
Author

daveeel commented Nov 29, 2015

Finally, I found all these errors were originated from me running your demo directly from the git cloned folder. Also my blank project was created at the same folder level.

After I moved out the demo folder to run. The errors are gone. I need to confess for my laziness on testing "clean"

Now I could get your demo running well. Both packages ( with & without -fiber ) are fine.

Big thanks to your checking back from time to time. Otherwise I might never nail down and be aware of the folder issue 👍

@daveeel daveeel closed this as completed Nov 29, 2015
@dr-dimitru
Copy link
Member

@daveeel great )
Glad you stay with it to the end
Have a nice time building graphs.

@HannesHolste
Copy link
Contributor

@dr-dimitru I'm encountering the same issue on Mac OSX El Capitan v10.11.2 running Meteor 1.2.1.

I followed the same steps as @daveeel above, but the error persists:

=> Started MongoDB.
W20160117-15:38:02.463(-8)? (STDERR)
W20160117-15:38:02.465(-8)? (STDERR) /Users/hannes/Desktop/test/ostrio-neo4jdriver/demo/.meteor/local/build/programs/server/boot.js:283
W20160117-15:38:02.465(-8)? (STDERR) }).run();
W20160117-15:38:02.465(-8)? (STDERR)    ^
W20160117-15:38:02.465(-8)? (STDERR) Error: Cannot find module 'fibers'
W20160117-15:38:02.466(-8)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20160117-15:38:02.466(-8)? (STDERR)     at Function.Module._load (module.js:280:25)
W20160117-15:38:02.466(-8)? (STDERR)     at Module.require (module.js:364:17)
W20160117-15:38:02.466(-8)? (STDERR)     at require (module.js:380:17)
W20160117-15:38:02.466(-8)? (STDERR)     at Object.<anonymous> (/Users/hannes/.meteor/packages/ostrio_neo4jdriver/.1.0.2.vjoleo++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:33:11)
W20160117-15:38:02.466(-8)? (STDERR)     at Object.<anonymous> (/Users/hannes/.meteor/packages/ostrio_neo4jdriver/.1.0.2.vjoleo++os+web.browser+web.cordova/npm/node_modules/neo4j-fiber/lib/helpers.js:62:4)
W20160117-15:38:02.466(-8)? (STDERR)     at Module._compile (module.js:456:26)
W20160117-15:38:02.466(-8)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20160117-15:38:02.466(-8)? (STDERR)     at Module.load (module.js:356:32)
W20160117-15:38:02.466(-8)? (STDERR)     at Function.Module._load (module.js:312:12)
=> Exited with code: 8

@dr-dimitru
Copy link
Member

Hi @HannesHolste have you read this one: #32 ?

@dr-dimitru
Copy link
Member

Things to try:

  • Try "Fibered" package version: ostrio:neo4jdriver@1.0.2-fiber
  • Make sure constraint version is set in .meteor/packages
  • Try to use NPM package directly via Npm.require('neo4j-fiber');
  • Globally install Fibers
  • Locally (Meteor project directory) install Fibers, for proper version of NodeJS via NVM (more about NVM in this SO answer)

@HannesHolste
Copy link
Contributor

Thank you @dr-dimitru! Double checking the constraint versions worked.

It turns out, my problem was that:

  • .meteor/packages correctly contained ostrio:neo4jdriver@1.0.2-fiber
  • BUT .meteor/versions only contained ostrio:neo4jdriver@1.0.2 without the -fiber constraint.

I wonder why Meteor handled the meteor add ostrio:neo4jdriver@1.0.2-fiber incorrectly...

@dr-dimitru
Copy link
Member

I wonder why Meteor handled the meteor add ostrio:neo4jdriver@1.0.2-fiber incorrectly...

No, idea, seems really Meteor don't like versions with prefixes. I guess as version without prefixes is major, Meteor trying to keep major versions in dependencies.

@shimza
Copy link

shimza commented Feb 22, 2016

So funny.... Took us a while to find the solution to this issue.

Turns out that when the same code base is shared and compiled on different machines, say Linux and WIndows; or in our case WIndows and OSX, different libraries are called.

When this is repeated problems of library and underlying code mismatch surface and Houston displays these problems.

@dr-dimitru
Copy link
Member

@shimza Yes, and only caused by fibers, as it is very complicated lib. But thats why this lib comes in two versions with dependency, and without to fibres.
Anyways, what your complete solution?

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

No branches or pull requests

5 participants