Coder Social home page Coder Social logo

Comments (15)

joeyshipley avatar joeyshipley commented on May 24, 2024 1

Oh, good catch. I wouldn't have thought to throttle the memory and test it. At any rate, thanks for work on all of this.

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

Exploring this a bit, I found that updating nanoexpress.js in the const _app creation that updating the function setting seems to not crash this.

_app.publish = (channel, message) => app.publish(channel, message);

I am still having issues with my channels/subscriptions, so I'll keep poking at it before trying a PR out.

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

After updating my local version to use the passthrough for the publish method, I was able to get it working without issue. I can provide code/examples if needed.

If it helps, here's a PR > nanoexpress/nanoexpress#100.

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

If possible, please, add example.

Thanks

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

Happy to. Thanks for addressing it so quickly. :)

https://github.com/joeyshipley/nanoexpress-publish

I have a local project that has a front end listening to the channel and it receives messages after the change. It's much larger though, not sure how to easily share end results past the server staying alive.

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

Issue not fixed, i got error

nanoexpress on  master [⇣] is 📦 v2.0.2 via ⬢ v13.14.0 
❯ NODE_ENV=development node examples/pub-sub.js 
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
  [nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:log] [Server]: started successfully at [localhost:4000] in [7ms] +0ms
Sending publish/broadcast message to channel > my-channel
fish: 'NODE_ENV=development node examp…' terminated by signal SIGSEGV (Address boundary error)
nanoexpress on  master [!?] is 📦 v2.0.3 via ⬢ v13.14.0 
❯ bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ node -v
v13.14.0
bash-3.2$ NODE_ENV=development node examples/pub-sub.js 
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
  [nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:log] [Server]: started successfully at [localhost:4000] in [5ms] +0ms
Sending publish/broadcast message to channel > my-channel
Segmentation fault: 11
bash-3.2$ NODE_ENV=development node --trace-uncaught examples/pub-sub.js 
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:error] `cookie` was not found in your dependencies list, please install yourself for this feature working properly +2ms
  [nanoexpress:error] `fast-json-stringify` was not found in your dependencies list, please install yourself for this feature working properly +0ms
  [nanoexpress:log] [Server]: started successfully at [localhost:4000] in [4ms] +0ms
Sending publish/broadcast message to channel > my-channel
Segmentation fault: 11
bash-3.2$ npm outdated
^C
bash-3.2$ exit
exit
nanoexpress on  master [!?] is 📦 v2.0.3 via ⬢ v13.14.0 took 1m25s 

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

Hrm, I'm still on LTS. I'll pull that node version and see on my end. -- update 13.14.0 worked for me also. I'm going to poke around and see if I can't make it fail again locally.

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

I updated example repo to specifically point to the patch, I forgot to do that earlier. I'll keep poking around, but if you could try that again it would be helpful.

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

Sorry, I'm learning some of this. How did you pull down v2.0.3?

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

It’s locally, just increased patch number

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

LTS maintenance mode comes later as currently I don’t have enough time to migrate, move to separate branch

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

I catch another bug while testing recently, so much bugs and so less time

from legacy.

joeyshipley avatar joeyshipley commented on May 24, 2024

Was thinking it might be a build/compile issue, but building from the fix repo keeps the code inline and worked for me again. Going to think about this and see if I can come up with a different direction to reproduce locally.

Do you have a different example, I can try that also if you do.

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

Please look at new branch docs/example-pub-sub, error while running as described here.

Can be run with this command NODE_ENV=development node --trace-uncaught examples/pub-sub.js

from legacy.

dalisoft avatar dalisoft commented on May 24, 2024

Thank you for bug-report.
Of course, i didn't throttled memory, MS VSCode and Apple AppStore did it for me 😆

from legacy.

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.