Skip to content

Instantly share code, notes, and snippets.

@nornagon
Created October 18, 2011 06:06
Show Gist options
  • Save nornagon/1294723 to your computer and use it in GitHub Desktop.
Save nornagon/1294723 to your computer and use it in GitHub Desktop.
Broken require
$ cat foo.js
require('share')
$ ls node_modules
share
$ head node_modules/share/package.json
{
"name": "share",
"version": "0.4.1",
"description": "A database for concurrent document editing",
"keywords": ["operational transformation", "ot", "concurrent", "collaborative", "database", "server"],
"homepage": "",
"author": "Joseph Gentle <[email protected]>",
"main": "lib/index.js",
"bin": {
"sharejs": "bin/sharejs",
$ node foo.js
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'share'
at Function._resolveFilename (module.js:326:11)
at Function._load (module.js:271:25)
at require (module.js:355:19)
at Object.<anonymous> (/Users/jeremya/Source/foo/foo.js:1:63)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at Array.<anonymous> (module.js:430:10)
at EventEmitter._tickCallback (node.js:126:26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment