webplatformforembedded / lightning-node Goto Github PK
View Code? Open in Web Editor NEWNode port for the Lightning framework.
License: Apache License 2.0
Node port for the Lightning framework.
License: Apache License 2.0
TypeError: this.stage.platform.registerKeydownHandler is not a function
TypeError: this.stage.platform.registerKeyupHandler is not a function
Trying to follow 'Getting Stated' for NodeJS (https://webplatformforembedded.github.io/Lightning/docs/gettingStarted/nodejs)
ran the following:
$ mkdir my_lightning
$ cd my_lightning
$ npm init # hit 'enter' through all the prompts
$npm i https://github.com/WebPlatformForEmbedded/Lightning-node.git --save
$ cat <<EOF > index.mjs
import lng from "wpe-lightning-node";
class MyApp extends lng.Application {
static _template() {
return {
Text: {text: {text: "hello world"}}
}
}
}
const options = {stage: {w: 900, h: 900, clearColor: 0xFF000000}};
options.stage.window = {title: "Border example", fullscreen: false};
const app = new MyApp(options);
EOF
$ node --experimental-modules index.mjs
The output was:
(node:77107) ExperimentalWarning: The ESM module loader is experimental.
{ Error: Cannot find module './build/Release/gles2'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/djerus200/_work/ghe/Lightning/my_lightning/node_modules/wpe-webgl/gles2.js:1:75)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3) code: 'MODULE_NOT_FOUND' }
my environment is as follows:
Node: v10.15.3
Npm: 6.4.1
OS: macOS Mojave 10.14.4
I get the below error when I tried out https://webplatformforembedded.github.io/Lightning/docs/gettingStarted/nodejs
C02V64NTHTD6:Lightning-test i336605$ npm i https://github.com/WebPlatformForEmbedded/Lightning-node.git --save
> [email protected] install /Users/kamath/code/timepass/Lightning-test/node_modules/canvas
> node-gyp rebuild
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found
gyp: Call to 'pkg-config cairo --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/kamath/code/timepass/Lightning-test/node_modules/canvas
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kamath/.npm/_logs/2019-03-22T01_53_41_604Z-debug.log
Can you please guide me on how to try out a sample code ?
My machine configuration :
Node version : v11.12.0
npm version : 6.7.0
MacOS MoJave Version 10.14.3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.