Git Product home page Git Product logo

Comments (14)

laverdet avatar laverdet commented on August 18, 2024

OS version?
Node version?
gcc version?
Command line used?

from node-fibers.

 avatar commented on August 18, 2024

OS: Ubuntu 10.10
Node: v0.3.5
gcc: ?
cmd:
nohup /usr/local/bin/node-fibers /opt/node/bb/virt-dispatch.js >> /opt/node/logs/btq-node-server.out.log 2>&1 &

from node-fibers.

 avatar commented on August 18, 2024

I upgrade to node 0.4.1 and now I'm getting ...

Could not find the coroutine shim!

from node-fibers.

laverdet avatar laverdet commented on August 18, 2024

Could you tell me a bit more about your setup? Do you have a ~/.npmrc? Where do you have node installed? Could you see if you could find coroutine.so somewhere in your node directory?

Have you tried the latest version of fibers in npm? There's some improvements there which may help you.

If not, take a peak at the node-fibers script yourself (cat which node-fibers), it's fairly short. Basically it needs to find coroutine.so which is created when you install fibers. It sounds like there's something weird about your config and coroutine.so is getting put in a place node-fibers can't find.

from node-fibers.

 avatar commented on August 18, 2024

I found that starting it with /usr/local/bin/node-fibers instead of just node-fibers works. My original problem is gone now also. So I'm good to go.

What do you think is going wrong when I just use node-fibers?

from node-fibers.

laverdet avatar laverdet commented on August 18, 2024

Interesting, I'm not quite sure what's gonig on. Does which node-fibers return "/usr/local/bin/node-fibers"?

You're running fibers 0.2.2 from npm? [email protected] has improved fiber-finding logic. Anyway if you're good to go I'll close this out. If you could troubleshoot it more and find out what happened it would be useful for other people using fibers, but don't feel obligated.

from node-fibers.

 avatar commented on August 18, 2024

Yes to both questions. Which gives /usr/local/bin/node-fibers and it is 0.2.2. If/when I have some free time I'll do more experimenting. I only start node from scripts so this problem doesn't bother me.

P.S. If this works as advertised I predict I am going to be a happy camper. I've used continuations in Python and love them. I'm very comfortable typing run and yield and I don't understand why people think they need higher level wrappers.

from node-fibers.

 avatar commented on August 18, 2024

I spoke too soon. The shim problem is back. So here are the answers to your questions...

I have no ~/.npmrc.

The only node folder with bin, lib, etc that I could find was in /root/local/node.

I searched the entire disk and coroutine.so is at three places:

/usr/local/lib/node/.npm/fibers/0.2.1/package/src/coroutine.so
/usr/local/lib/node/.npm/fibers/0.2.2/package/src/coroutine.so
/root/local/node/lib/node/.npm/fibers/0.2.2/package/src/coroutine.so

The /usr/local/bin/node-fibers script is a bit over my head so I can't really debug it. If I have to I will decipher it.

from node-fibers.

laverdet avatar laverdet commented on August 18, 2024

Perhaps try uninstalling both versions of fibers and reinstalling? It could be calling the old 0.2.1 node-fibers script instead.

It seems like "/root/local/node/lib/node/.npm/fibers/0.2.2/package/src/coroutine.so" would be a symlink to "/usr/local/lib/node/.npm/fibers/0.2.2/package/src/coroutine.so" or vice versa.

Without actually looking at the environment it's difficult for me to understand exactly what is failing. Other users have had luck installing fibers on different distributions of Linux, and OS X.. so it seems to be something peculiar of your installation.

Based on the information you posted you could probably get fibers running by doing:
FIBER_SHIM=1 LD_PRELOAD="/usr/local/lib/node/.npm/fibers/0.2.2/package/src/coroutine.so" node <myscript.js>

But that would be a hack until you could figure out why node-fibers isn't finding coroutine.so on its own.

from node-fibers.

 avatar commented on August 18, 2024

Your hack is working. The next time I need to upgrade anything I'll completely wipe node and fibers and install from scratch.

If leaving this hanging bothers you, I'd be happy to let you log in and look around.

from node-fibers.

laverdet avatar laverdet commented on August 18, 2024

I'm ok leaving it this way for now. Do let me know if reinstalling doesn't solve the issue, or if you find out what the original issue was.

from node-fibers.

lm1 avatar lm1 commented on August 18, 2024

Unfortunately with latest node node-fibers wrapper fails again, it's a node bug (nodejs/node-v0.x-archive#755).

from node-fibers.

laverdet avatar laverdet commented on August 18, 2024

I'm not seeing any hard failures, just broken pipe errors. The script still works. Could you pull and let me know if 1b31427 helps?

from node-fibers.

lm1 avatar lm1 commented on August 18, 2024

OK, seems to work fine with latest npm, but with npm 2.x I was getting "Could not find the coroutine shim!" beside EPIPE. Not sure why.

from node-fibers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.