Node throwing an error on ansi module - node.js

I'm looking to check out Mike Bostock's Rivers, but I'm running into an error with Node.js. npm install gives me:
module.js:340
throw err;
^
Error: Cannot find module 'ansi'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/Cellar/node/0.10.0/lib/node_modules/npm/node_modules/npmlog/log.js:5:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Any pointers? Or, any previous questions I missed that might point to a solution?

If you run on RH CentOS of Fedore reinstall
yum reinstall nodejs-ansi.noarch
This fixed my similar issue

You can run:
npm install ansi -g
to make ansi available globally (you may have to use sudo)

Related

Cannot find module "gulp-nodemon". On windows 7, 32 bit. Using Power Shell

I am new to Node.js. I am trying to learn it through doing something.
I am making an Sentiment Analysis App for twitter.
I am using Gulp.
However, whenever I use "gulp" in my cmd. Note that I have installed Nodemon.
I get the following error :
Error: Cannot find module 'gulp-nodemon'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\home\desktop\sentimentAnalysisApp\Gulpfile.js:4:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Also, I am following this [tutorial].
http://www.sitepoint.com/creating-sentiment-analysis-application-using-node-js/
Thank you.
You need to install gulp-nodemon as well.
Try npm install -g gulp-nodemon.

Node error trying to run yeoman

I am trying to use yeoman to scaffold for a webapp. when I try and do anything with node I get error thrown. Below is my command line output when I try and 'update node' and when i try and run 'yo webapp'. Can anyone help point out the error?
$ node update
module.js:340
throw err;
^
Error: Cannot find module '/Users/william/wdi/pixelect_project/pixelect_client_server/update'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
$ yo webapp
module.js:340
throw err;
^
Error: Cannot find module 'inquirer'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/insight/lib/index.js:9:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I had same problem. I my case helped this: npm install -g yo
For me this is also happening with other node apps as well (eg. grunt and gulp).
Reinstalling it does the trick. In this case you have to reinstall generator-webapp (npm install -g generator-webapp). If after reinstalling generator you get the same message than reinstall yeoman as levon suggested.

Yeoman, ran yo webapp, grunt throwing error

I ran 'yo webapp' and am now trying to run grunt serve and get the error that is below. Has anyone seen this error before?
grunt serve
module.js:340
throw err;
^
Error: Cannot find module 'findup-sync'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/william/wdi/pixelect_project/pixelect_client_server/node_modules/grunt/lib/grunt/file.js:24:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
You are probably forgetting about installing the dependencies. Try to install the dependencies using bower before running grunt.
Try to run this:bower install.

Error: Cannot find module 'indexof' in node.js

I am trying to use nodejs for a application, i am continuously getting the
error: Cannot find module.
module.js:340
throw err;
^
Error: Cannot find module 'emitter'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/nilesh/node/node-v0.10.32/prgm/node_modules/socket.io/node_modules/socket.io-adapter/node_modules/socket.io-parser/index.js:9:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
i tried installing one, but the other comes up, and this is continuous. Is there something which can be done to this, i tried doing this
npm install -g emitter,
it prints the path where it is present but it is not solving the issue.What could be the solution to this.
Thanks,
You probably want:
var Emitter = require('events').EventEmitter in your code
or
npm install emitter from the commandline.
I don't know why you're trying to install indexof, the error is about emitter.

Bower installs but gives error on every command

I've installed bower via npm npm install -g bower, i get no problems. But when i want to run bower, even just bower or bower -help i get the following error:
module.js:340
throw err;
^
Error: Cannot find module './parser'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/handlebars/lib/handlebars/compiler/base.js:1:80)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
cannot seem to find anyone else with this problem online.

Resources