#379 ✓resolved
Gustavo Di Pietro

window object in server version

Reported by Gustavo Di Pietro | October 14th, 2010 @ 12:34 PM | in 2.1.1 Release

I tried to import the server version of right (http://rightjs.org/builds/current/right-server.js) in node with:

require('./right');

Executing the file, I get the following error:

/home/Gdipietro/right/right.js:221
  $ext(RightJS[natives[i]] = window[natives[i]], {
                      ^
ReferenceError: window is not defined
    at Object.<anonymous> (/home/Gdipietro/right/right.js:221:23)
    at Module._compile (module:426:23)
    at Module._loadScriptSync (module:436:8)
    at Module.loadSync (module:306:10)
    at loadModule (module:251:12)
    at require (module:374:12)
    at Object.<anonymous> (/home/Gdipietro/right/index.js:5:1)
    at Module._compile (module:426:23)
    at Module._loadScriptSync (module:436:8)
    at Module.loadSync (module:306:10)

Is it normal that server side version tries to access the window object? Thanks

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Attachments

Tags

Pages