Giter Site home page Giter Site logo

rendr-examples's People

Contributors

alexindigo avatar aselbie avatar crwang avatar gitter-badger avatar ingiulio avatar juliocanares avatar purusho avatar saponifi3d avatar spikebrehm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rendr-examples's Issues

RequireJS example doesn't work

It happens because this piece of code in injected into common.js and reaches the client.

// Create a simple path alias to allow browserify to resolve
// the runtime on a supported path.
module.exports = require('./dist/cjs/handlebars.runtime');

Error:

Uncaught ReferenceError: module is not defined(anonymous function) @ common.js:6658

500 Error: Cannot find module 'handlebars' / Uncaught Error: Cannot find module 'handlebars'

Hey, I hope this is the appropriate place for this. I've been looking to convert a few of my personal projects from straight node/backbone to rendr, and I'm really excited about it. I've been having a few issues getting the examples to run though.

I'm not clear on why this is happening (I'm not very familiar with broswerify) but the example apps don't seem to be seeing the handlebars module. I'm guessing that the actual version of handlebars they're supposed to be using is in rendr-handlebars, but when I do a fresh git clone of the examples, cd into one of them and npm install everything seems to go well, but whenever I go to any of the pages I get a 500 Error: Cannot find module 'handlebars'.

I can get around it by simply doing an npm install handlebars, but this seems to be covering up the root issue, because when I then go to the page I've got an Uncaught Error: Cannot find module 'handlebars' in the console, which seems to be preventing it from running properly as every page is getting pulled down from the server (presumably because the Backbone app isn't actually running.)

I've got a compiledTemplates.js file, so the grunt handlebars stuff seems to be working fine.
I'm guessing this is just something I'm doing wrong, but I don't think I missed any steps in the example docs.

npm install fails on fresh checkout

[email protected] postinstall /home/tomas/dev/node/rendr-examples/00_simple
test -f ../../package.json && npm install ../../ || echo

npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9.3
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.12.8
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9

npm ERR! System Linux 3.11.0-19-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/tomas/dev/node/rendr-examples/00_simple
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/tomas/dev/node/rendr-examples/00_simple/npm-debug.log
npm ERR! not ok code 0

Rendr 1.0 Breaks SPA functionality

Using either initialize instead of postinitialize or rendr 1.0, breaks the single page app functionality and loads all resources upon any navigation.
The issue started with this commit: 281cb14

Using Gulp

Have anybody tried compiling using Gulp?
I tried Gulp, but with no luck and everytime when I try http://localhost:3030
I get:

500 TypeError: object is not a function
   at module.exports.Backbone.View.extend.getInnerHtml (/Users/thunderball/Projects/rendr-test/node_modules/rendr/shared/base/view.js:191:12)
   at module.exports.Backbone.View.extend.getHtml (/Users/thunderball/Projects/rendr-test/node_modules/rendr/shared/base/view.js:198:21)
   at ViewEngine.getViewHtml (/Users/thunderball/Projects/rendr-test/node_modules/rendr/server/viewEngine.js:69:15)
   at ViewEngine.render (/Users/thunderball/Projects/rendr-test/node_modules/rendr/server/viewEngine.js:22:16)
   at View.render (/Users/thunderball/Projects/render-test/node_modules/express/lib/view.js:93:8)
   at EventEmitter.app.render (/Users/thunderball/Projects/rendr-test/node_modules/express/lib/application.js:566:10)
   at ServerResponse.res.render (/Users/thunderball/Projects/rendr-test/node_modules/express/lib/response.js:938:7)
   at /Users/thunderball/Projects/render-test/node_modules/rendr/server/router.js:87:11
   at Object.module.exports.index (/Users/thunderball/Projects/rendr-test/app/controllers/main_controller.js:5:9)
   at /Users/thunderball/Projects/rendr-test/node_modules/rendr/server/router.js:74:12

Does anybody know when could be a problem? I tried same project with Grunt from example and it's working.

Upgrade dependencies to the latest modules

I currently have a fork at roncli/rendr-examples that upgrades all of the modules to their latest versions. This also fixes some outstanding issues reported by other users as well, as my goal was to get everything working, including the karma tests in examples 00 and 06.

However, three bugs are preventing me from actually creating a pull request for this:

Once these three pull requests are accepted, I will create a pull request here that will upgrade the dependencies of the examples to all of the latest modules.

My code should also resolve #1, #2, and #3, and the pull request will supercede #4 and #5. Of course, if you accept #4 and #5, I will merge those in to my code as well.

~ bad karma ~

Just got this. Haven't tried to fix it yet...

00_simple master » npm install

> [email protected] postinstall /Users/zeke/code/forks/rendr-examples/00_simple
> test -f ../../package.json && npm install ../../ || echo


npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9.3
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.12.8
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9

npm ERR! System Darwin 13.0.0
npm ERR! command "/Users/zeke/.nvm/v0.10.28/bin/node" "/Users/zeke/.nvm/v0.10.28/bin/npm" "install"
npm ERR! cwd /Users/zeke/code/forks/rendr-examples/00_simple
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/zeke/code/forks/rendr-examples/00_simple/npm-debug.log
npm ERR! not ok code 0

00_simple master » node -v
v0.10.28

00_simple master » npm -v
1.4.9

00_simple master » npe devDependencies
{
  "grunt": "~0.4.1",
  "grunt-browserify": "~1.2.9",
  "grunt-contrib-stylus": "~0.5.0",
  "grunt-contrib-handlebars": "~0.5.11",
  "grunt-contrib-watch": "~0.3.1",
  "nodemon": "~0.7.6",
  "mocha": "~1.9.0",
  "chai": "~1.8.1",
  "karma": "~0.10.4",
  "karma-chrome-launcher": "~0.1.0",
  "karma-mocha": "~0.1.0"
}

Problem: Unable to understand the difference between examples

I am researching for an isomorphic solution for my next web app and rendr fits 100% on our use case.
But while looking to the examples isn't clear what are they trying to accomplish since it all seems the same project.
Would be nice to have something on the project readme,

Running grunt server on requirejs example returns error

After running an npm install successfully upon starting grunt server the task is aborted with the following message:

Running "rendr_requirejs:build_rendr_handlebars" (rendr_requirejs) task

Tracing dependencies for: rendr-handlebars
Error: ENOENT, no such file or directory
'/Users/paulcorbett/Sites/rendr-examples/05_requirejs/public/js/rendr/shared/
base/view.js'
In module tree:
rendr-handlebars/index
rendr-handlebars/shared/helpers
Warning: RequireJS failed. Use --force to continue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.