Yeoman dependencies for AngularJS project - compass

Using Yeoman and the AngularJS generator I could previously follow their tutorial and install all the necessary packages and tools (bower, gulp, grunt,...) to get up and running. Per their website:
npm install -g yo bower grunt-cli gulp
then added the angularJS project 'generator':
npm install -g generator-angular
created a folder locally, and run
yo angular
in that folder in order to prepare a sample AngularJS project with all the necessary tools and scaffolding generated by Yeoman.
The command:
grunt serve
Launched the sample application successfully, allowing me to start learning about AngularJS (which I'm very new to).
The problem: I have repeated these steps again, (3 months later), and, admittedly, I have potentially taken on updates to some of the installed packages.
Now, when I create a new project and invoke 'grunt serve' I get:
Running "concurrent:server" (concurrent) task
Warning: Running "compass:server" (compass) task
Warning: Command failed: C:\Windows\system32\cmd.exe /s /c "compass.bat --versio
n"
'compass.bat' is not recognized as an internal or external command,
operable program or batch file.
Use --force to continue.
Aborted due to warnings.
and the site does not launch...
Researching this problem, some responses say that I now need to install yet another tool - Ruby, followed by the 'compass' gem.
Is this really necessary ?? (I'm hesitant because the Yeoman website does not require this to get started using the angular generator).
Is there perhaps another solution ?
thanks

It seems like compass is necessary by default.
It also seems that the only solution here is to go ahead and download Ruby (if you do not already have it), in order to install compass. These instructions cover how:
Download Ruby here: http://rubyinstaller.org/downloads/ and install.
Install the compass library: gem install compass

Yes compass is necessary.
Download and install ruby http://rubyinstaller.org/downloads/
and run gem install compass in ruby command prompt to install compass.
now it will work!!!.

Related

Problems installing GULP on Windows 10 as a limited user

I am trying to install gulp on my development Windows 10 Pro machine and it is not working. I have installed node.js and when I use my admin account I can run gulp. However, when I am not an admin, Windows cannot find the library.
Additional details:
I have looked at Can't install gulp on windows 10 and have searched the web with no luck.
Using Visual Studio 2015 and the project uses gulp to generate css sass and minify js files.
When I run npm install gulp -g -verbose I get (eventually) the following output:
Have you tried cleaning npm cache. use
npm cache clean
And if that doesn't work try installing gulp locally just for that project.
npm install gulp
The screenshot you provided, there is one line where is written that you have not correctly created json file.
package.json should be actual JSON not JavaScript
can you provide your package.json file?

Installing Bootstrap via Grunt. How do I run npm install

In the Bootstrap documentation after Node.js and Grunt have been installed they say I have to :
Navigate to the root /bootstrap/ directory, then run npm install
What's that mean? I've open a folder with Bootstrap source files but how am I supposed to "run npm install'? I am totally confused.
If you haven't done so, download and install Node.js. The process varies per platform, so refer to the download link.
Once you've installed Node.js, you may need to open a new shell or even reboot for the any new environment variables to take affect.
Once you have Node.js installed, you should be able to:
cd ./bootstrap
npm install

Not being able to run bower in VS 2012

Since yesterday I have been trying to install and use bower for managing my dependencies. After going through many articles although I have been able to install it. I am not being able to run it. Beside many articles I also followed this video:
Bower running in Package Manager Console in Visual Studio install
As the video is in some other languages even though I followed all the commonds, I could not get
$env:path
After doing everything when I type bower in the Package manager console, it gives me error
Thanks in advance for helping me out.
PS: I have already installed npm and node.
In order to use Bower correctly in Windows, you need to install msysgit correctly. This is the requirement as specified in bower github https://github.com/bower/bower#a-note-for-windows-users.
The option you have to select during installation is Run Git from the Windows Command Prompt.
After successful installation. Restart Visual Studio and then you are good to go.
In my case, after installing msysgit, I installed bower using:
PM> Install-Package Bower
Above step automatically installed dependencies (node.js, jquery)
I also had to specify relative path to bower.cmd:
PM>.\MyProject.bin\bower.cmd install semantic-ui

grunt init:node not working

I'm trying to do an intro grunt tutorial. I've installed git, node.js, and grunt globally (or at least I thought I did using: npm install -g grunt (which installs). I then made a quick directory and entered it (mkdir demo, cd demo), but when I type:
> grunt init:node
at the prompt I get the following:
grunt-cli: The grunt command line interface (v0.1.11)
Fatal error: unable to find local grunt
If you're seeing this message, either a Gruntfile wasn't found or hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
Which I've looked at and it says to do what I'm doing and what the tutorial mentions??? Any ideas what I've done wrong? Node.js and Git have been working fine so I can only assume it is grunt or the install that has failed.
Thanks
with grunt you need two elements. a global grunt-cli as you have installed using npm install -g grunt-cli and also a local (to the project) copy of grunt itself. so in the folder of your project install this with npm install grunt --saveDev this will install a local grunt and also add it to your devDependencies in your package.json file. you will also need a Gruntfile.js in the project folder. This is a great write-up http://www.integralist.co.uk/Grunt-Boilerplate.html

Yeoman for Angular, then "grunt serve" won't start

This is the first time I use yeoman to setup the scaffolding for an AngularJS app, and I have to admit I am likely new to the nodeJS, grunt and bower world.
So, here's what I've done so far:
I made sure yeoman, grunt-cli and the angular-generator packages are installed
npm install -g yo grunt-cli bower
npm install -g generator-angular
Generated my app
yo angular
I also tried:
yo angular --min-safe
So far, al seems good. Between the options given, I choose the Twitter Bootstrap one, no angular dependencies, and to overwrite my local .gitignore file.
After all that, I try to run my app:
grunt serve
At this point, grunt complains that it is not locally installed into the project, so I run:
npm install grunt --save-dev
No again, trying to run the app:
grunt serve
And this is where I get blocked:
C:\Projects\what-now>grunt serve
Running "serve" task
Running "clean:server" (clean) task
Running "concurrent:server" (concurrent) task
Running "copy:styles" (copy) task
Done, without errors.
Warning:
C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:261
throw err;
^
TypeError: Cannot read property 'stdout' of undefined
at compile (C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:37:10)
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\compass.js:68:7
at C:\Projects\what-now\node_modules\grunt-contrib-compass\tasks\lib\compass.js:121:11
at _fileCreated (C:\Projects\what-now\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:172:7)
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:53:5
at C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:62:5
at OpenReq.Req.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:142:5)
at OpenReq.done (C:\Projects\what-now\node_modules\grunt-google-cdn\node_modules\bower\node_modules\fstream\node_modules\graceful-fs\graceful-fs.js:64:22)
//... stack trace continues ...
Looking at the code that blows up in compass' compile method, what I find is the following:
child.stdout.pipe(process.stdout);
This makes me think that child is undefined for some reason, and this variable comes from a call to grunt.util.spawn. This is where I am at a loss.
Am I missing any dependency? Am I missing any configuration?
Info:
OS: Windows 8 x64
node: v0.10.22
*sighs*, sorry.
All it took me is to write this question to then figure out I needed to have installed Ruby and the compass gem. Now it makes sense: the process for compiling would not spawn up.
After installing Ruby, run:
gem install compass
And you should be good to go.
EDIT: After you install Ruby, you need to make sure that the ruby runtime files' path is added to your PATH variable. (Thanks JagWire!)
On windows i had a few instalations of ruby:
C:\ruby187
and
C:\Ruby200-x64
install compass in both places, using:
gem install compass
this resolve my issue on windows 8 64bit
Following the same procedure for Ember, running grunt. Received the error "TypeError: Cannot read property 'stdout' of undefined." Did gem install compass (ruby had already been installed on my windows 7 64 bit) even though compass was supposed to be installed earlier and this worked. Ran grunt and grunt serve with no problems.

Resources