Yeoman hangs on line 72 of events.js, won't let me do anything - node.js

First of all, I'm running this on Windows 8.
So When I install yeoman with npm install -g yo, it seems to work fine.
Then, when I type in the command yo, I get the usual response of:
[?] What would you like to do? (Use arrow keys)
Run the Famous generator (0.2.10)
Update your generators
Install a generator
Find some help
Get me out of here!
But then when I click on, for example,
Update your Generators
I get the following:
Its the exact same error every time, and it's preventing me from using any yeoman generators, which is making it impossible then to use the new Famo.us engine.
So far, I've tried uninstalling and reinstalling Node, Yeoman, and everything in between. I've also tried it in various command prompts, including the standard Windows Command Prompt, Git Bash, NodeJS commandPrompt, and cygwin.
Does anyone know how I can fix this?
One avenue of action I've been thinking about is trying to find this events.js (or whatever other file this error is originating from) and trying to build from there.
Also, this person # Yeoman gifsicle error (and others) seems to be having similar issues, but the fixes mentioned in that question don't seem to be working for me.
Thanks!

Related

How to resolve bycrypt dependency issue in module.

I keep getting this issue:
[snip of my issue][1]
I'm teaching myself node and am trying to make a CRUD RESTful application in my spare time. I'm working off this book:
https://leanpub.com/mean-machine.
For the past 3 days I've been stuck with this issue. It is specifically concerning the bcrypt-node.js . It's job is to hash passwords. Some things I have tried.
Downloaded python 3.5 as I got errors saying the runtime was needed to execute.
Setting python environment variable in PATH
npm uninstall and install.
Tried creating a new project, same issues cropped up.
npm clear cache
Since it is an old version of the bcrypt-node.js module changed the version in package.json from "0.0.3" to "0.0.5". I thought it could be a bug. Unlikely as that is.
I'm very new to node.js so I feel like I'm doing something silly that I just cannot see. Also I don't understand a lot of the information the command line is providing me. Thank you in advance.
EDIT 1:
Picture of my code.
Edit. (For future visitors) I needed to pay more attention to the various dependencies and a further understanding of JS in general to utitlise the power of Node.js, which is something I didn't do. Also recommended is a good understanding of Express.
A deeper understand of the npm is needed.
I found a fix through trial and error and some googling.
In case any one looks up this again in the future I entered:
npm install node-gyp -g && npm cache clean && rm -rf node_modules && npm installinto the command line and it appeared to fix the issue when I ran nodemon server.js
Fingers crossed it does not crop up again.
If someone would like to explain to me what exactly was the problem I had I would really appreciate it. I have a feeling a module or dependency wasn't installed correctly?
EDIT 1. Furthermore configure the PATH in your environment variables.
ie I created a path for python in the command line
PATH python = C:\Python27\python.exe & another PATH for MongoDB
i.e C:\Program Files\MongoDB\Server\3.2\bin

const INLINE = 'inline'; with npm related commands

Today I was trying to work on Angular2 (template https://akveo.github.io). As per installation guide, I ran following commands.
I have installed Node.js v6.9.1.
npm install --Worked fine.
npm server --Failed with below error.
E:\........\node_modules\script-ext-html-webpack-plugin\index.js:3
const INLINE = 'inline';
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
After many random searches and failing to resolve it, I decided to think about it with a calm head. To me it looks like it is a problem with ES2015/ES6. Package script-ext-html-webpack-plugin uses const variable which is a ES2016 feature. However system is unable to resolve it.
Also this problem can come with any package like hapi, selinium etc. But everything should have same solution I guess.
I have tried many related commands on the installation guide of the website mentioned above but nothing works and ends with same error. I have also many have faced same issue online but nothing concrete is visible as answer.
Could anyone help me out?
Update
Below approach has also fixed many of my colleague's machine who were facing some random errors with nodejs.
This problem is resolved in at least my machine. I am certainly not a person who understand nodejs completely but got it working after some googling. The solution given below may be common to many other issues I guess.
The system I am working has Windows 10 as Operating System and has 64 bit processor.
Go to control panel and uninstall nodejs (just to make sure you do not have traces of any previous install).
Install latest version of nodejs from their website (I installed v6.9.1 for 64 bit processor).
Go to Environment variables for system (just type environmental variables in start menu if using Windows 10) and edit the Path. Delete ‘C:/Program Files (x86)/nodejs’ (as I had installed 64 bit nodejs). This ensures when using command you do not use any other previously installed nodejs.
Start command prompt in Admin mode and navigate to your project and run npm install.
In case you get any/some error, then run npm info graceful-fs -v or npm info graceful-fs whichever runs in your machine.
Then run npm update -g npm.
Then run npm install again and this time it should work.
Run npm start and everything should work fine.
On running website, sometimes we see any other issue and that can be seen from console logs. But good thing is, console logs also tell you the problem. In most cases its related to 32 bit and 64 bit processor due to our recent changes. In my case, I was facing issue with SASS configuration due to 32/64 bit machine and console log asked me to run npm rebuild node-sass to fix the issue.
Go back to command prompt, hit Ctrl+C to stop npm server. Run node rebuild node-sass. Run npm start again and everything should be working.
Hope it helps.

Cannot find module 'assetmanager'

I'm trying to run the MEAN stack on windows. I've installed all the pre-requisites (I think) but when I try to start the server via the gulp command I get the error:
Error: Cannot find module 'assetmanager'.
IMAGE:
I have tried running npm install assetmanager which run fine but I still get this error.
This is my first time trying to run node on a machine (I should have used a linux box) so go easy on me as I am learning :-).
Any and all help appreciated.
David
I had exactly the same problem on Linux Mint 17.2.
The failing way: This was my first project that I'd generated and I don't think I had all the dependencies installed before I ran the init command (g++ was missing).
I tried the npm install assetmanager command as you did and then install worked. Running gulp after this, it got further but this time I was missing mongoose. I installed that then it couldn't find .../config/env/all so I sylinked the default.js config. Then running gulp again, errorhandler was missing. I figured it shouldn't be this hard so...
The working way: I deleted that failure of a project and init'd a new one and it worked. Unfortunately I'm not sure if the init didn't work the first time but I missed the error/warning or something else caused it. All I can recommend is try creating another project and see if that works.

npm problems with windows

I've looked through the different articles here, but I'm not finding out the answer I need, or don't understand necessarily what has been explained in other posts.
I downloaded node.js got my github up and have cloned the phonecat site, that part works fine. I can even check npm/node versions through cmd, but whenever I install using either "npm install" or "npm install -g" "Couldn't read depndencies" couldn't find package.json" has a long list of errors:
http://tinypic.com/1r54rjf4
I have tried caching, updating, restarting, uninstalling, reinstalling, giving permissions to fully allow windows system32 for commands. I have been reading for a few hours, and I am just at a complete loss here. Any help would be greatly appreciated!
When you don't specify a module to download, npm will look for a package.json. It's not finding one, which is why you're seeing all kinds of errors.
Is there a project you're working on? If you want to start a new one you can run npm init. If there's an existing one that has a package.json, you can navigate to that directory in your terminal and then npm install should work.
I didn't. I'm still wrestling with it. I'm not sure what to do about it either. I had one of my friends come over that's familiar with node and he couldn't figure it out. It must be a permissions issue somewhere on the computer. I can't figure out what else it could be.

Issues installing swiper.js (node.js/grunt noob)

Having issues getting swiper.js to work. Requires grunt/bower. I'm completely new to js generators and am only able to get through about half the walkthrough before running into issues.
When I type $grunt dist into terminal, I get the following response: -bash: dist: command not found
What step am I missing?
Followed the idangerous steps to the letter: http://www.idangero.us/sliders/swiper/plugins/scrollbar.php
I have most often see "X command not found" for one of the following reasons:
The project's Grunt dependencies aren't installed or aren't installed properly
Your Gruntfile is mis-configured or missing
To fix this, first make sure there is a package.json file in your project. This will tell the npm what dependencies the project has and install them accordingly (assuming the package.json file is also configured correctly).
Next, make sure you have installed grunt correctly.
If you're still having issues, open your Gruntfile and search for:
grunt.registerTask('dist
This will show where the "dist" task is being defined. If you for some reason don't find it, then there's your problem. If you do find it, then check the proceeding commands inside square brackets that look like this:
grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js', 'dist-docs']);
'clean', 'dist-css', etc. are all other tasks defined in the Gruntfile, and there could be an issue with those as well.
If there's an issue with your package.json or Gruntfile, then trying re-installing the project with bower and repeat the above steps to ensure that it's not an issue on your end.
If it's not, then something is probably wrong with the author's source code.

Resources