Skip to content

Instantly share code, notes, and snippets.

@kumavis
Created August 8, 2013 06:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumavis/7be352f3b61cc0846285 to your computer and use it in GitHub Desktop.
Save kumavis/7be352f3b61cc0846285 to your computer and use it in GitHub Desktop.
---FLAGRANT SYSTEM ERROR---
--- error #0: ---
Error: "browserify exited with code 1"
code: 1
stderr: Error: module "WNdb" not found from "/tmp/natural11378-14880-1yt3j86/node_modules/natural/lib/natural/wordnet/wordnet.js"
dirPath: /tmp/natural11378-14880-1yt3j86
------
Get ahold of @jesusabdullah on freenode, twitter or github
with the ENTIRETY of the contents of this message, and he can
try to help you out.
Have a nice day!
@jfhbrook
Copy link

jfhbrook commented Aug 8, 2013

What route did you hit?

@jfhbrook
Copy link

jfhbrook commented Aug 8, 2013

Also, note to self: include route in error message

@jfhbrook
Copy link

jfhbrook commented Aug 8, 2013

At a cursory glance: WNdb is definitely on npm. So this is weird.

As a sanity check: Does this work locally?

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

POST http://wzrd.in/multi 500 (Internal Server Error)

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

code is:

var natural = require('natural'),
  tokenizer = new natural.WordTokenizer()
console.log(tokenizer.tokenize("my dog has flees."))

//=> [ 'my', 'dog', 'has', 'flees' ]

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

it does work if you just run it through node, but browserifying locally doesn't work without installing WNdb

$ npm install
npm WARN package.json natural-test@0.0.0 No description
npm WARN package.json natural-test@0.0.0 No repository field.
npm WARN package.json natural-test@0.0.0 No README data
npm http GET http://registry.npmjs.org/natural
npm http 200 http://registry.npmjs.org/natural
npm http GET http://registry.npmjs.org/natural/-/natural-0.1.21.tgz
npm http 200 http://registry.npmjs.org/natural/-/natural-0.1.21.tgz
npm http GET http://registry.npmjs.org/sylvester
npm http GET http://registry.npmjs.org/apparatus
npm http GET http://registry.npmjs.org/underscore
npm http 304 http://registry.npmjs.org/underscore
npm http 304 http://registry.npmjs.org/sylvester
npm http 304 http://registry.npmjs.org/apparatus
natural@0.1.21 node_modules/natural
├── apparatus@0.0.7
├── underscore@1.5.1
└── sylvester@0.0.21

note that WNdb isn't listed as a dep

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

not specified as a dep, though it is used

unless you plan to specify your own dictionary directory it seems

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

@jesusabdullah this is kinda a weird case / poor implementation on their side.

appending require('WNdb') to the top of the code does not solve the problem

any ideas?

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

heh, WNdb weighs in at about 10mg, so maybe this is not the best requirebin toy

Don't rack your head over this, I was just playing around with some newly discovered modules

@kumavis
Copy link
Author

kumavis commented Aug 8, 2013

WNdb also requires fs -- is there a way to get requirebin/wzrd.in to use https://github.com/substack/brfs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment