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.
Related
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.
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.
When I set up the angular generator with yeoman I get this error after doing grunt serve
module.js:340
throw err;
^
Error: Cannot find module './lexer'
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> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:10:10)
at Object.<anonymous> (/var/www/angMaps/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js:167:4)
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)
As #SteveBirkner already mentioned, delete the node_modules directory and run npm install command again. It should work.
I had the same problem, and in the end of the log I was receiving such a message:
...
http 200 http://registry.npmjs.org/-/all
Killed
The problem was the lack of enough memory in my VM. One solution was to use swap is mentioned here.
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.
I'm not able to run NodeJS Express-Spdy examples downloaded from GitHub.
I'm getting the below error:
C:\Program Files\nodejs\node_modules\npm\node_modules\express-spdy>node app.js
module.js:340
throw err;
^
Error: Cannot find module 'express-spdy'
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:\Program Files\nodejs\node_modules\npm\node_modules\express- spdy\app.js:6: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 Function.Module.runMain (module.js:497:10)
Please tell me how to resolve this error, as I have put express-spdy inside node_modules folder.
When I run the example using SPDY module only by placing it inside node_modules it works fine but with express-spdy module it shows above error.