Skip to content
New issue

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

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

Already on GitHub? # to your account

Worker is not defined #6

Closed
joshuaquek opened this issue Jan 29, 2018 · 7 comments
Closed

Worker is not defined #6

joshuaquek opened this issue Jan 29, 2018 · 7 comments
Labels
question Further information is requested

Comments

@joshuaquek
Copy link
Contributor

Got this error. I did a regular npm install and it cant seem to run.

ReferenceError: Worker is not defined
    at e (/Users/josh/Desktop/node-playground/node_modules/greenlet/dist/greenlet.js:1:87)
    at Object.<anonymous> (/Users/josh/Desktop/node-playground/examples/greenlet-multithread.js:3:11)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/josh/Desktop/node-playground/server.js:4:1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! playground@1.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the playground@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@joshuaquek
Copy link
Contributor Author

My code that I'm running:

screen shot 2018-01-29 at 5 00 23 pm

@chinanf-boy
Copy link

chinanf-boy commented Jan 29, 2018

you may try run in browser

@michaelzoidl
Copy link

Maybe someone should note in the README that greenlet is Browser-Only?
It uses Web-Workers which is not supported by node.

@carcinocron
Copy link

How hard would it be to add NodeJS support without breaking the API?

@HZSamir
Copy link

HZSamir commented Jan 29, 2018

Quite interested in NodeJS support as well

@developit
Copy link
Owner

It seems like @joshuaquek PR'd to his fork - I'll update the readme to mention usage in Node requires node-webworker.

developit added a commit that referenced this issue Jan 29, 2018
@developit developit added the question Further information is requested label Jan 29, 2018
@Mijago
Copy link

Mijago commented May 3, 2019

Please note that node-webworker is out-of-date and has hard-to-solve issues on its own: pgriess/node-webworker#47

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants