Closed alfredwesterveld closed 13 years ago
is this the same issue? https://github.com/mauricemach/zappa/issues/closed/#issue/9
i meet thie one also,
i just do this :"
npm install zappa zappa hi.coffee "
then:"navigator is not defined"
This is not an issue in zappa itself but it does impact zappa use.
Indeed any clones / npm installs of zappa in the last day have been crippled by a recent change to jsdom which is a dependent of node-jquery which is a dependent of zappa.
I'll post fix instructions shortly.
@mauricemach - I'm not sure how you can fix this problem in your code yet but I've submitted a pull-request with the fix to node-jquery
Meanwhile, thanks to the awesomeness of npm, you can just continue to use zappa as always by doing:
npm activate jsdom@0.1.20
Or if you're coming from a fresh install:
npm install jsdom@0.1.20
I'll see what I can do at zappa to mitigate the problem. Thanks for all for reporting!
OK, so we get the error by only requiring jquery. Until they accept pyrotechnick's pull request, you can avoid it by doing npm install jsdom@0.1.20
.
I have also pushed to master a change to only require jquery when you use the postrender feature. You can install it with npm install https://github.com/mauricemach/zappa/tarball/master
. I'll publish it as 0.1.4 later if we don't find any further problems.
https://github.com/mauricemach/zappa/issues/#issue/12/comment/594010 => works for me.
alfred@alfred-laptop:~/node/zappa$ npm activate jsdom@0.1.20 npm info it worked if it ends with ok npm info using npm@0.2.11-3 npm info using node@v0.2.5 npm info predeactivate jsdom@0.1.20 npm info deactivate jsdom@0.1.20 npm info postdeactivate jsdom@0.1.20 npm info preactivate jsdom@0.1.20 npm info activate jsdom@0.1.20 npm info postactivate jsdom@0.1.20 npm ok alfred@alfred-laptop:~/node/zappa$ node
require('jquery'); ReferenceError: navigator is not defined at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:85:14 at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:917:4 at create (/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6895:4) at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6899:18 at Object.
(/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6903:1) at Module._compile (node.js:462:23) at Module._loadScriptSync (node.js:469:10) at Module.loadSync (node.js:338:12) at loadModule (node.js:283:14) at require (node.js:411:14)
This issue has been resolved as of https://github.com/coolaj86/node-jquery/commit/d1c9d25f94b0e06d96f9cc35774acc0d2f78a454
things going right after i uninstall the zappa , jquery, jsdom and the npm, redo the npm zappa.
I also got it working again
P.S: I think it is a jquery error. I have also added issue to node-jquery.
$ cat /etc/issue Ubuntu 10.10 \n \l
$ node -v 0.2.5
$ npm ls installed
$ npm ls installed npm info it worked if it ends with ok npm info using npm@0.2.11-3 npm info using node@v0.2.5 coffee-script@0.9.5 Unfancy JavaScript =jashkenas installed latest remot coffeekup@0.2.1 Markup as CoffeeScript. =mauricemach installed lates connect@0.2.7 High performance middleware framework =creationix =t connect@0.3.0 High performance middleware framework =creationix =t connect@0.4.0 High performance middleware framework =creationix =t connect-auth@0.2.1 Middleware for Connect (node.js) for handling your auth connect-auth@0.2.2 Middleware for Connect (node.js) for handling your auth connect-redis@0.2.0 Redis session store for Connect =tjholowaychuk insta email@0.2.2 A simple wrapper for sendmail. =aaron installed late express@1.0.0rc4 Sinatra inspired web development framework =tjholowa express@1.0.0 Sinatra inspired web development framework =tjholowa expresso@0.6.4 TDD framework, light-weight, fast, CI-friendly =tjho expresso@0.7.0 TDD framework, light-weight, fast, CI-friendly =tjho eyes@0.1.6 a customizable value inspector =cloudhead installed facebook-connect@0.1.1 Misc routines for Facebook Apps developing with node.js facebook-js@0.0.3 easy peasy facebook client =masylum installed latest faye@0.5.3 Simple pub/sub messaging for the web =jcoglan instal htmlparser@1.7.3 Forgiving HTML/XML/RSS Parser in JS for both Node and jade@0.5.5 Jade template engine =tjholowaychuk installed remote jade@0.5.6 Jade template engine =tjholowaychuk installed latest jquery@1.4.3 jQuery: The Write Less, Do More, JavaScript Library =astro installed latest remote
mailer@0.4.1 send emails from node.js to a smtp server, simple as ca
mjsunit.runner@0.1.3 Command line mjsunit runner which provides an easy way
node-expat@1.1.0 NodeJS binding for fast XML parsing. =astro installe
node-expat@1.2.0 NodeJS binding for fast XML parsing. =astro installe
node-stringprep@0.0.2 ICU StringPrep profiles =astro installed latest remo
node-twitter@0.1.0 installed
node-xmpp@0.2.3 Idiomatic XMPP client, component & server library for n
npm@0.2.11-3 A package manager for node =isaacs installed latest
oauth@0.8.3 Library for interacting with OAuth 1.0, 1.0A and 2. Pr
recaptcha@1.0.0 Display and verify a Recaptcha captcha =mirhampt ins
redis@0.3.7 Redis client library =mjr installed remote
redis@0.3.9 Redis client library =mjr installed latest remote
request@0.10.0 Simplified HTTP request method. =mikeal installed la
socket.io@0.6.1 The cross-browser WebSocket =rauchg =Tim-Smart insta
vows@0.5.2 Asynchronous BDD & continuous integration for node.js
jsdom@0.1.21 CommonJS implementation of the DOM intended to be platf less@1.0.36 Leaner CSS =cloudhead installed remote css parser le less@1.0.40 Leaner CSS =cloudhead installed latest remote css pa ltx@0.0.1
wwwdude@0.0.2 Simple to use HTTP library on top of the built in libs zappa@0.1.3 Razor-sharp DSL for modern web apps. =mauricemach in npm ok
$ zappa cuppa.coffee ReferenceError: navigator is not defined at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:85:14 at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:917:4 at create (/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6895:4) at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6899:18 at Object. (/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6903:1)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)