sofa / app

Sofa sample app
http://sofa.io
Other
89 stars 31 forks source link

Unable to install sofa.io on MAc running Mavericks #10

Closed moses5407 closed 10 years ago

moses5407 commented 10 years ago

I tried installing sofa via the download button and run script .. but on running the script I got several errors essentially saying there weren't .json files and that it couldn't find a local grunt.

The json files are in the same directory as the run script Not sure how to check for grunt.

Attempting to open the localhost:9000 doesn't work, not surprisingly.

Any suggestions appreciated!

nickjanssen commented 10 years ago

Hi @moses5407, my apologies for the late reply. I tried this just now and I had no errors whatsoever. Possibly you are missing one of the required dependencies. Do you have Grunt installed globally? You should do so using npm install -g grunt-cli.

Could you post here the full output of your error?

moses5407 commented 10 years ago

I installed grunt via that command prefixed with sudo and it succeeded.

But when I run "run" i get this:

✔ npm installed

✔ bower installed

Installing node dependencies...

npm ERR! install Couldn't read dependencies

npm ERR! package.json ENOENT, open '/Users/jamesmoses/package.json'

npm ERR! package.json This is most likely not a problem with npm itself.

npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Darwin 13.4.0

npm ERR! command "node" "/usr/local/bin/npm" "install"

npm ERR! cwd /Users/jamesmoses

npm ERR! node -v v0.10.32

npm ERR! npm -v 1.4.28

npm ERR! path /Users/jamesmoses/package.json

npm ERR! code ENOPACKAGEJSON

npm ERR! errno 34

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR! /Users/jamesmoses/npm-debug.log

npm ERR! not ok code 0

✔ node dependencies installed

Installing bower dependencies...

bower ENOENT No bower.json present

✔ bower dependencies installed

✔ Dependencies installed successfully

Starting app at localhost port 9000...

grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt

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

logout

[Process completed]


so, it's not finding grunt locally despite the global install?

On Wed, Oct 15, 2014 at 9:54 PM, Nick Janssen notifications@github.com wrote:

Hi @moses5407 https://github.com/moses5407, my apologies for the late reply. I tried this just now and I had no errors whatsoever. Possibly you are missing one of the required dependencies. Do you have Grunt installed globally? You should do so using npm install -g grunt-cli.

Could you post here the full output of your error?

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59326195.

nickjanssen commented 10 years ago

The run script appears to be executing inside the directory /Users/jamesmoses/which is weird. I'm also on Mavericks so it's surely not an OS issue. Where did you extract the file? From what folder are you running the ./run command? Are you doing ./run or just run?

Also (you likely heard this before) you should not install dependencies using sudo, rather make sure that npm and others have correct permissions. But that's another story and likely unrelated to your problem here.

moses5407 commented 10 years ago

why is that weird? I'm new to Mac but this is how the machine is setup... I unzipped the file which was in Downloads .. and it created a subdirectory app-master.

There were no instructions to move or unsip it into a particular folder. Does this matter?

"run" gives a command not found error

./run gives the prior errors .. ending in unable to find local grunt

I erased everything, re-unzipped and did further install without sudo .. but the end result was the same.

thanks

On Wed, Oct 15, 2014 at 10:33 PM, Nick Janssen notifications@github.com wrote:

The run script appears to be executing inside the directory /Users/jamesmoses/which is weird. I'm also on Mavericks so it's surely not an OS issue. Where did you extract the file? From what folder are you running the ./run command? Are you doing ./run or just run?

Also (you likely heard this before) you should not install dependencies using sudo, rather make sure that npm and others have correct permissions. But that's another story and likely unrelated to your problem here.

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59330039.

moses5407 commented 10 years ago

should I be installing a local grunt and, if so, how?

thanks, again

On Wed, Oct 15, 2014 at 10:33 PM, Nick Janssen notifications@github.com wrote:

The run script appears to be executing inside the directory /Users/jamesmoses/which is weird. I'm also on Mavericks so it's surely not an OS issue. Where did you extract the file? From what folder are you running the ./run command? Are you doing ./run or just run?

Also (you likely heard this before) you should not install dependencies using sudo, rather make sure that npm and others have correct permissions. But that's another story and likely unrelated to your problem here.

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59330039.

nickjanssen commented 10 years ago

It is weird because the run script seems to execute inside of /Users/jamesmoses/ instead of the unzipped folder.

Are you in a Terminal executing the ./run command? Like this? You need to run the command from a Terminal inside the unzipped folder, which is then inside your Downloads folder. This should be ~/Downloads/app-master

nikke in ~/Downloads/app-master
$ ./run
✔ npm installed
✔ bower installed
  Installing node dependencies...

Regarding Grunt you just need it globally, the run script takes care of the rest.

moses5407 commented 10 years ago

Jamess-MacBook-Air:~ jamesmoses$ cd Downloads/app-master

Jamess-MacBook-Air:app-master jamesmoses$ ./run

✔ npm installed

✔ bower installed

Installing node dependencies...

npm WARN deprecated grunt-ngmin@0.0.3: use grunt-ng-annotate instead

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git Cloning into bare repository '/Users/jamesmoses/.npm/_git-remotes/git-github-com-couchcommerce-sofa-base-git-d588b7c5'...

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git Permission denied (publickey).

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git fatal: Could not read from remote repository.

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git Please make sure you have the correct access rights

npm ERR! git clone git@github.com:couchcommerce/sofa-base.git and the repository exists.

npm ERR! Error: Command failed: Cloning into bare repository '/Users/jamesmoses/.npm/_git-remotes/git-github-com-couchcommerce-sofa-base-git-d588b7c5'...

npm ERR! Permission denied (publickey).

npm ERR! fatal: Could not read from remote repository.

npm ERR!

npm ERR! Please make sure you have the correct access rights

npm ERR! and the repository exists.

npm ERR!

npm ERR! at ChildProcess.exithandler (child_process.js:648:15)

npm ERR! at ChildProcess.emit (events.js:98:17)

npm ERR! at maybeClose (child_process.js:756:16)

npm ERR! at Socket. (child_process.js:969:11)

npm ERR! at Socket.emit (events.js:95:17)

npm ERR! at Pipe.close (net.js:465:12)

npm ERR! If you need help, you may report this entire log,

npm ERR! including the npm and node versions, at:

npm ERR! http://github.com/npm/npm/issues

npm ERR! System Darwin 13.4.0

npm ERR! command "node" "/usr/local/bin/npm" "install"

npm ERR! cwd /Users/jamesmoses/Downloads/app-master

npm ERR! node -v v0.10.32

npm ERR! npm -v 1.4.28

npm ERR! code 128

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR! /Users/jamesmoses/Downloads/app-master/npm-debug.log

npm ERR! not ok code 0

✔ node dependencies installed

Installing bower dependencies...

bower cached git://github.com/angular/bower-angular-mocks.git#1.0.8

bower validate 1.0.8 against git:// github.com/angular/bower-angular-mocks.git#~1.0.7

bower cached git://github.com/angular/bower-angular.git#1.0.8

bower validate 1.0.8 against git:// github.com/angular/bower-angular.git#1.0.8

bower install angular-mocks#1.0.8

bower install angular#1.0.8

angular-mocks#1.0.8 bower_components/angular-mocks

└── angular#1.0.8

angular#1.0.8 bower_components/angular

✔ bower dependencies installed

✔ Dependencies installed successfully

Starting app at localhost port 9000...

grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt

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

Jamess-MacBook-Air:app-master jamesmoses$

On Wed, Oct 15, 2014 at 11:03 PM, Nick Janssen notifications@github.com wrote:

It is weird because the run script seems to execute inside of /Users/jamesmoses/ instead of the unzipped folder.

Are you in a Terminal executing the ./run command? Like this? You need to run the command from a Terminal inside the unzipped folder, which is then inside your Downloads folder. This should be ~/Downloads/app-master

nikke in ~/Downloads/app-master $ ./run ✔ npm installed ✔ bower installed Installing node dependencies...

Regarding Grunt you just need it globally, the run script takes care of the rest.

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59333334.

nickjanssen commented 10 years ago

Seems to have gotten further now! It now fails because it can't seem to read one of our repositories. I've updated the script, could you please try again with a fresh download copy?

moses5407 commented 10 years ago

Hi, NIck

Sorry for the delay .. long work hours and timezone difference.

Here's the result after downloading a fresh copy from sofa.io:

Jamess-MacBook-Air:app-master jamesmoses$ ./run ✔ npm installed ✔ bower installed Installing node dependencies... npm WARN deprecated grunt-ngmin@0.0.3: use grunt-ng-annotate instead npm WARN deprecated ngmin@0.4.1: use ng-annotate instead

fsevents@0.3.0 install /Users/jamesmoses/Downloads/app-master/node_modules/karma/node_modules/chokidar/node_modules/fsevents node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

CXX(target) Release/obj.target/fse/fsevents.o In file included from ../fsevents.cc:86: ../src/constants.cc:10:66: warning: template argument uses unnamed type [-Wunnamed-type-template-args] object->Set(NanNewv8::String("kFSEventStreamEventFlagNone"), NanNew<... ^~ /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:290:1: note: unnamed type used in template argument was declared here enum { ^ 1 warning generated. SOLINK_MODULE(target) Release/fse.node SOLINK_MODULE(target) Release/fse.node: Finished npm ERR! Error: EACCES, mkdir '/Users/jamesmoses/.npm/coffee-script/1.7.1' npm ERR! { [Error: EACCES, mkdir '/Users/jamesmoses/.npm/coffee-script/1.7.1'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/Users/jamesmoses/.npm/coffee-script/1.7.1', npm ERR! parent: 'karma-coffee-preprocessor' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.4.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Users/jamesmoses/Downloads/app-master npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! path /Users/jamesmoses/.npm/coffee-script/1.7.1 npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/Users/jamesmoses/.npm/coffee-script/1.7.1' npm ERR! not ok code 0 ✔ node dependencies installed Installing bower dependencies... bower cached git://github.com/angular/bower-angular-mocks.git#1.0.8 bower validate 1.0.8 against git:// github.com/angular/bower-angular-mocks.git#~1.0.7 bower cached git://github.com/angular/bower-angular.git#1.0.8 bower validate 1.0.8 against git:// github.com/angular/bower-angular.git#1.0.8 bower install angular-mocks#1.0.8 bower install angular#1.0.8

angular-mocks#1.0.8 bower_components/angular-mocks └── angular#1.0.8

angular#1.0.8 bower_components/angular ✔ bower dependencies installed ✔ Dependencies installed successfully Starting app at localhost port 9000...

Local Npm module "grunt-contrib-uglify" not found. Is it installed? Local Npm module "grunt-contrib-watch" not found. Is it installed? Local Npm module "grunt-contrib-connect" not found. Is it installed? Local Npm module "grunt-html2js" not found. Is it installed? Local Npm module "grunt-contrib-jshint" not found. Is it installed? Loading "grunt-karma.js" tasks...ERROR Error: Cannot find module 'karma' Local Npm module "grunt-contrib-cssmin" not found. Is it installed? Local Npm module "grunt-ngmin" not found. Is it installed? Local Npm module "grunt-protractor-runner" not found. Is it installed? Local Npm module "grunt-nodemon" not found. Is it installed? Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Npm module "grunt-contrib-jshint" not found. Is it installed? Loading "grunt-karma.js" tasks...ERROR

Error: Cannot find module 'karma' Local Npm module "grunt-contrib-cssmin" not found. Is it installed? Local Npm module "grunt-ngmin" not found. Is it installed? Local Npm module "grunt-protractor-runner" not found. Is it installed? Local Npm module "grunt-nodemon" not found. Is it installed? Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Usage: npm

where is one of: add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, docs, edit, explore, faq, find, find-dupes, get, help, help-search, home, i, info, init, install, isntall, issues, la, link, list, ll, ln, login, ls, outdated, owner, pack, prefix, prune, publish, r, rb, rebuild, remove, repo, restart, rm, root, run-script, s, se, search, set, show, shrinkwrap, star, stars, start, stop, submodule, t, tag, test, tst, un, uninstall, unlink, unpublish, unstar, up, update, v, version, view, whoami

npm -h quick help on npm -l display full usage info npm faq commonly asked questions npm help search for help on npm help npm involved overview

Specify configs in the ini-formatted file: /Users/jamesmoses/.npmrc or on the command line via: npm --key value Config info can be viewed via: npm help config

npm@1.4.28 /usr/local/lib/node_modules/npm Jamess-MacBook-Air:app-master jamesmoses$ Loading "grunt-karma.js" tasks...ERROR -bash: Loading: command not found Jamess-MacBook-Air:app-master jamesmoses$ >> Error: Cannot find module 'karma' -bash: Cannot: command not found Jamess-MacBook-Air:app-master jamesmoses$ >> Local Npm module "grunt-contrib-cssmin" not found. Is it installed?

Local Npm module "grunt-ngmin" not found. Is it installed? Local Npm module "grunt-protractor-runner" not found. Is it installed? Local Npm module "grunt-nodemon" not found. Is it installed? Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmosfound. Is it installed? "grunt-ngmin" not

Local Npm module "grunt-protractor-runner" not found. Is it installed? Local Npm module "grunt-nodemon" not found. Is it installed? Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmosrunner" not found. Is it installed?ractor-

Local Npm module "grunt-nodemon" not found. Is it installed? Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmost found. Is it installed?grunt-nodemon" no

Local Npm module "grunt-node-inspector" not found. Is it installed? Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmostor" not found. Is it installed?ode-inspec

Local Npm module "grunt-parallel" not found. Is it installed? Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmosot found. Is it installed?runt-parallel" n

Local Npm module "grunt-contrib-nodeunit" not found. Is it installed? Loading "changelog.js" tasks...ERROR Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmoseunit" not found. Is it installed?trib-nod Loading "changelog.js" tasks...ERROR

Error: Cannot find module 'qq' Cannot rename missing "watch" task. Warning: Task "karma:unit" not found. Use --force to continue.

Aborted due to warnings. Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmoses$ Loading "changelog.js" tasks...ERROR -bash: Loading: command not found Jamess-MacBook-Air:app-master jamesmoses$ >> Error: Cannot find module 'qq' -bash: Cannot: command not found Jamess-MacBook-Air:app-master jamesmoses$ >> Cannot rename missing "watch" task. -bash: rename: command not found Jamess-MacBook-Air:app-master jamesmoses$ Warning: Task "karma:unit" not found. Use --force to continue. -bash: Warning:: command not found Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmoses$ Jamess-MacBook-Air:app-master jamesmoses$

On Thu, Oct 16, 2014 at 12:16 AM, Nick Janssen notifications@github.com wrote:

Seems to have gotten further now! It now fails because it can't seem to read one of our repositories. I've updated the script, could you please try again with a fresh download copy?

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59341173.

nickjanssen commented 10 years ago

It does appear that Xcode is required, something we missed. I'll add that as a dependency, can you try the following answer on SO? http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error-on-osx-mavericks

Could you try again after you installed Xcode and tried the answer from the SO link above?

moses5407 commented 10 years ago

HI, NIck

I downloaded and installed xcode .. then set the path per the SO link.

Running ./run from the downloads/app-master directory failed BUT running sudo ./run succeeded!

Thanks very much!

On Fri, Oct 17, 2014 at 11:33 PM, Nick Janssen notifications@github.com wrote:

It does appear that Xcode is required, something we missed. I'll add that as a dependency, can you try the following answer on SO? http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error-on-osx-mavericks

Could you try again after you installed Xcode and tried the answer from the SO link above?

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59604903.

moses5407 commented 10 years ago

This looks great! I'm going thru the docs later today. Is there an admin section/panel?

On Fri, Oct 17, 2014 at 11:33 PM, Nick Janssen notifications@github.com wrote:

It does appear that Xcode is required, something we missed. I'll add that as a dependency, can you try the following answer on SO? http://stackoverflow.com/questions/17980759/xcode-select-active-developer-directory-error-on-osx-mavericks

Could you try again after you installed Xcode and tried the answer from the SO link above?

— Reply to this email directly or view it on GitHub https://github.com/sofa/app/issues/10#issuecomment-59604903.

nickjanssen commented 10 years ago

Great to hear you got it working! Unfortunately our app does not ship with an admin section panel, as the local data is just for testing. For now the app is meant to be linked up with a remote API such as the couchcommerce SaaS. It's a good idea for the future though!