Closed olimart closed 10 years ago
Lineman doesn't support loading node packages from your client-side code out of the box.
For that you'd need to use browserify (which is still only experimentally supported). You can kick it off with npm i --save-dev lineman-browserify
On Mon, May 26, 2014 at 12:37 AM, Olivier notifications@github.com wrote:
Hi, trying to add the octonode library here is what I did.
- lineman new my-app
- cd my-app
- Added
"octonode": "0.6.x"
underdevDependencies
ofpackage.json
- npm install
- lineman run
- Added
var github = require('octonode');
in hello.js- Open
localhost:8000
, inspect browser console. Error raiseReferenceError: Can't find variable: require
What am I missing to add node packages?
Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman/issues/273
ok. thanks.
@olimart You might look into Browserify (and lineman-browserify) for shimming node modules into the client-side build.
Hi, trying to add the octonode library here is what I did.
"octonode": "0.6.x"
underdevDependencies
ofpackage.json
var github = require('octonode');
in hello.jslocalhost:8000
, inspect browser console. Error raiseReferenceError: Can't find variable: require
What am I missing to add node packages?