Comments (4)
Please note that napajs by now doesn't support all node modules, since many of Node.js core modules are not supported in Napa.js workers yet. So module that directly or indirectly depends on unsupported Node.js APIs cannot be loaded in workers.
Please see https://github.com/Microsoft/napajs/blob/master/docs/api/node-api.md
from napajs.
If you want to just execute a function from a module, you don't need to broadcast in order to use it. Simply do zone.execute('../lib/my_module', 'my_function', [args]);
.
Certainly you can do zone.broadcast('f = require("../lib/my_function");
, which will set f
in global
.
from napajs.
The function file requires object-hash
, which can't be loaded by workers. I don't know why.
from napajs.
That's quite a big limitation. Anyway, thanks for help.
from napajs.
Related Issues (20)
- There's no napa-binding-v0.2.3-node-v51-win32-x64.tar.gz HOT 8
- There's no ./lib/index.js. HOT 2
- [centos 7.2]Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found HOT 2
- NapaJS for ethereum transactions HOT 2
- CreateZone:75 Failed to initialize zone HOT 2
- Beginners Question: costs of napa.js HOT 4
- Use napajs as a secure sandbox? HOT 2
- not support --napa_binding_binary_host_mirror
- how does this lib compare to gpu.js ?
- coredump while running the tutorial
- can't find fuction 'foo' in module 'projectdir/test'
- Error: ReferenceError: setTimeout is not defined HOT 4
- is this the ruby killer we've been waiting for?
- CMake Error: Could not create named generator Visual Studio 15 2017 Win64 Win64 HOT 3
- install script set to release 67 but should be v64 HOT 1
- 1): no suitable image found. /napa-binding.node: unknown file type, first eight bytes:
- how child thread import vm
- Can i use napajs in only v8 enviroment without Nodejs?
- This repo is missing important files HOT 18
- Node v18 unavailable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from napajs.