tlrobinson / node-jslinux

jslinux (http://bellard.org/jslinux/) compatibility layer for Node.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: ea is not defined

derek opened this issue · comments

$ node -v
v0.4.7

$ npm -v
1.0.6

$ git clone https://github.com/tlrobinson/node-jslinux.git

$ cd node-jslinux/

$ cat package.json | grep version
"version": "0.0.1",

$ sudo npm link
> typed-array@0.0.2 install /Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array
> node-waf configure build

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : ok /usr/local/lib/node_modules/ 
Checking for node prefix                 : ok /usr/local 
'configure' finished successfully (0.353s)
Waf: Entering directory `/Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array/build'
[1/2] cxx: typed-array.cc -> build/default/typed-array_1.o
[2/2] cxx_link: build/default/typed-array_1.o -> build/default/typed-array.node
Waf: Leaving directory `/Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array/build'
'build' finished successfully (1.193s)

> jslinux@0.0.1 install /Users/drg/Code/node/lib/node-jslinux
> ./download_jslinux

Downloading http://bellard.org/jslinux/cpux86.js to /Users/drg/Code/node/lib/node-jslinux/external/cpux86.js
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 92455  100 92455    0     0  68641      0  0:00:01  0:00:01 --:--:-- 78618
Downloading http://bellard.org/jslinux/linuxstart.bin to /Users/drg/Code/node/lib/node-jslinux/external/linuxstart.bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14858  100 14858    0     0  20762      0 --:--:-- --:--:-- --:--:-- 27771
Downloading http://bellard.org/jslinux/root.bin to /Users/drg/Code/node/lib/node-jslinux/external/root.bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2048k  100 2048k    0     0   312k      0  0:00:06  0:00:06 --:--:--  378k
Downloading http://bellard.org/jslinux/vmlinux26.bin to /Users/drg/Code/node/lib/node-jslinux/external/vmlinux26.bin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1712k  100 1712k    0     0   293k      0  0:00:05  0:00:05 --:--:--  366k

/usr/local/bin/jslinux -> /usr/local/lib/node_modules/jslinux/bin/jslinux
/usr/local/lib/node_modules/jslinux -> /Users/drg/Code/node/lib/node-jslinux

$ node
> require("jslinux").boot()
[Node.js switching to raw mode. Hit Ctrl-C four times in a row to exit.]
------------------------------
[Node.js switching to raw mode. Hit Ctrl-C four times in a row to exit.]
------------------------------
ReferenceError: ea is not defined
at new anonymous (eval at getConstructor (/Users/drg/Code/node_modules/jslinux/jslinux.js:26:38))
at new (/Users/drg/Code/node_modules/jslinux/jslinux.js:62:12)
at Object.boot (/Users/drg/Code/node_modules/jslinux/jslinux.js:66:17)
at Object. (/Users/drg/Code/node_modules/jslinux/jslinux.js:71:9)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
at [object Context]:1:1

same here.

Unfortunately it's very brittle because it relies on minified variable names, and if jslinux gets updated it will break. I can't include a copy of jslinux because I'm not licensed to.

I'll push a temp fix soon and try to think of a workaround.

On May 21, 2011, at 9:37 AM, derekreply@reply.github.com wrote:

$ node -v
v0.4.7

$ npm -v
1.0.6

$ git clone https://github.com/tlrobinson/node-jslinux.git

$ cd node-jslinux/

$ cat package.json | grep version
"version": "0.0.1",

$ sudo npm link

typed-array@0.0.2 install /Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array
node-waf configure build

Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /usr/local/lib/node_modules/
Checking for node prefix : ok /usr/local
'configure' finished successfully (0.353s)
Waf: Entering directory /Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array/build' [1/2] cxx: typed-array.cc -> build/default/typed-array_1.o [2/2] cxx_link: build/default/typed-array_1.o -> build/default/typed-array.node Waf: Leaving directory/Users/drg/Code/node/lib/node-jslinux/node_modules/typed-array/build'
'build' finished successfully (1.193s)

jslinux@0.0.1 install /Users/drg/Code/node/lib/node-jslinux
./download_jslinux

Downloading http://bellard.org/jslinux/cpux86.js to /Users/drg/Code/node/lib/node-jslinux/external/cpux86.js
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 92455 100 92455 0 0 68641 0 0:00:01 0:00:01 --:--:-- 78618
Downloading http://bellard.org/jslinux/linuxstart.bin to /Users/drg/Code/node/lib/node-jslinux/external/linuxstart.bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14858 100 14858 0 0 20762 0 --:--:-- --:--:-- --:--:-- 27771
Downloading http://bellard.org/jslinux/root.bin to /Users/drg/Code/node/lib/node-jslinux/external/root.bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2048k 100 2048k 0 0 312k 0 0:00:06 0:00:06 --:--:-- 378k
Downloading http://bellard.org/jslinux/vmlinux26.bin to /Users/drg/Code/node/lib/node-jslinux/external/vmlinux26.bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1712k 100 1712k 0 0 293k 0 0:00:05 0:00:05 --:--:-- 366k

/usr/local/bin/jslinux -> /usr/local/lib/node_modules/jslinux/bin/jslinux
/usr/local/lib/node_modules/jslinux -> /Users/drg/Code/node/lib/node-jslinux

$ node

require("jslinux").boot()
[Node.js switching to raw mode. Hit Ctrl-C four times in a row to exit.]


[Node.js switching to raw mode. Hit Ctrl-C four times in a row to exit.]


ReferenceError: ea is not defined
at new anonymous (eval at getConstructor (/Users/drg/Code/node_modules/jslinux/jslinux.js:26:38))
at new (/Users/drg/Code/node_modules/jslinux/jslinux.js:62:12)
at Object.boot (/Users/drg/Code/node_modules/jslinux/jslinux.js:66:17)
at Object. (/Users/drg/Code/node_modules/jslinux/jslinux.js:71:9)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at require (module.js:348:19)
at [object Context]:1:1

Reply to this email directly or view it on GitHub:
#2

From jslinux FAQ: "At this point, any mirroring or redistribution of the code needs my explicit permission."
(http://bellard.org/jslinux/faq.html)

.. did you already tried to ask him?

Should be fixed with v0.02

SHA: 082a369

Nevermind. Now it should be fixed:

SHA: 14fac91