angular setup

$ npm install -g bower

$ npm cache clean
$ sudo npm install -g bower

download & install node over again

and update npm

$ sudo npm install npm -g

$ npm -v

$ node -v

now it’s working.

$ npm install -g bower

and, you don’t need bower in package.json dependencies.

$ bower install angular angular-resource angular-route angular-animate sass-bootstrap lodash jquery modernizr font-awesome --save
$ bower install angular-mocks --save-dev

# Install Karma:
$ npm install karma --save-dev

$ sudo npm install karma --save-dev

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

“Open up Xcode, and accept the new user agreement. This was happening because a new version of Xcode was downloaded and the new agreement was not accepted.”

$ sudo xcodebuild -license
$ sudo npm install karma --save-dev

# Install plugins that your project needs:
$ npm install karma-jasmine karma-chrome-launcher --save-dev

(why all sudo? anyway)

$ npm install -g karma-cli

jasmine & phantomjs

npm install -g phantomjs
npm install karma-jasmine --save-dev
npm install karma-phantomjs-launcher --save-dev

karma init karma.conf.js

karma config file:

frameworks: ['jasmine'],    
browsers: ['PhantomJS'],    
autoWatch: false,    
singleRun: true,    
# ...etc.   

Now read this

React with Ruby on Rails 5.1

$ ruby -v ruby 2.4.1p111 $ rails -v Rails 5.1.4 $ brew install yarn --without-node $ yarn -v 1.0.2 $ rails new scoreboard --webpack=react --api BOTH of two options. why not? First let’... Continue →