These are chat archives for jescalan/roots

28th
Jul 2015
Sergio Forés
@t0t
Jul 28 2015 09:12
Thanks for reply @jenius,
  • jquery.finger is working well for me with browserify extension.
  • 3.2.1 is not compiling my site properly on this moment. I'll wait more time for the update.
Jeff Escalante
@jescalan
Jul 28 2015 17:01
Hey @t0t -- update out you can now upgrade to 3.2.2 cleanly
Sergio Forés
@t0t
Jul 28 2015 17:02
ok. I'll go for it! ;)
Sergio Forés
@t0t
Jul 28 2015 17:11
@jenius, having some errors:
➜  maderlim git:(master) sudo npm install -g roots    
Password:

> fsevents@0.3.6 install /usr/local/lib/node_modules/roots/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

  SOLINK_MODULE(target) Release/.node
  SOLINK_MODULE(target) Release/.node: Finished
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
  SOLINK_MODULE(target) Release/fse.node: Finished
/usr/local/bin/roots -> /usr/local/lib/node_modules/roots/bin/roots

> roots@3.2.2 postinstall /usr/local/lib/node_modules/roots
> node ./post_install.js

---------------------------------------------------------
Roots uses analytics to help the core team to get a
better view of how developers use roots. All analytics
are collected anonymously, and analytics data is used
only to make roots better for everyone. However, if you
would like to disable analytics, you are welcome to do
so by running the command `roots analytics --disable`

Much like roots itself, roots' analytics are open source.
Check out http://roots.cx/analytics for more information.
---------------------------------------------------------
roots@3.2.2 /usr/local/lib/node_modules/roots
├── graceful-fs@4.1.2
├── open@0.0.5
├── colors@1.1.2
├── osenv@0.1.3 (os-homedir@1.0.1, os-tmpdir@1.0.1)
├── vinyl@0.5.0 (clone-stats@0.0.1, replace-ext@0.0.1, clone@1.0.2)
├── when@3.7.3
├── coffee-script@1.9.3
├── mkdirp@0.5.1 (minimist@0.0.8)
├── argparse@1.0.2 (sprintf-js@1.0.3)
├── rimraf@2.4.2 (glob@5.0.14)
├── minimatch@2.0.10 (brace-expansion@1.1.0)
├── readdirp@1.4.0 (readable-stream@1.0.33, minimatch@0.2.14)
├── serve-static@1.10.0 (escape-html@1.0.2, parseurl@1.3.0, send@0.13.0)
├── configstore@0.3.2 (xdg-basedir@1.0.1, object-assign@2.1.1, user-home@1.1.1, graceful-fs@3.0.8, uuid@2.0.1, js-yaml@3.3.1)
├── keen.io@0.1.3 (underscore@1.5.2, superagent@0.21.0)
├── inquirer@0.9.0 (figures@1.3.5, strip-ansi@3.0.0, ansi-regex@2.0.0, cli-width@1.0.1, through@2.3.8, chalk@1.1.0, readline2@0.1.1, run-async@0.1.0, rx-lite@2.5.2)
├── update-notifier@0.5.0 (is-npm@1.0.0, configstore@1.2.0, semver-diff@2.0.0, repeating@1.1.3, chalk@1.1.0, string-length@1.0.1, latest-version@1.0.1)
├── chokidar@1.0.5 (arrify@1.0.0, path-is-absolute@1.0.0, is-glob@1.1.3, glob-parent@1.2.0, async-each@0.1.6, is-binary-path@1.0.1, anymatch@1.3.0, fsevents@0.3.6)
├── lodash@3.10.0
├── accord@0.20.1 (indx@0.2.3, convert-source-map@1.1.1, fobject@0.0.3, glob@5.0.14, semver@4.3.6, resolve@1.1.6, uglify-js@2.4.24)
├── charge@0.0.4 (infestor@0.3.0, minimist@1.1.2, node-uuid@1.4.3, anti-matter@0.0.1, chalk@1.0.0, lodash.assign@3.2.0, escapist-middleware@0.0.2, archivist-middleware@0.0.2, hygienist-middleware@0.0.3, alchemist-middleware@0.0.4, morgan@1.6.1, pathologist-middleware@0.0.1, connect@3.4.0, lodash.remove@3.1.0, compression@1.5.1, faye-websocket@0.9.4, publicist-middleware@0.0.1, apology-middleware@0.0.4)
├── sprout@0.4.3 (isbinaryfile@2.0.4, ncp@2.0.0, which@1.1.1, rimraf@2.3.4, ejs@2.3.3, underscore.string@3.0.3, readdirp@1.3.0, coffee-script@1.9.2, bluebird@2.9.34, js-yaml@3.3.1, lodash@3.8.0)
├── ship@0.2.4 (indx@0.2.3, mime@1.3.4, minimatch@1.0.0, file-map@0.0.1, fstream@1.0.7, optimist@0.6.1, argparse@0.1.16, tar@1.0.3, ftp@0.3.10, coffee-script@1.8.0, github@0.2.1, ssh2@0.3.6, lodash@2.4.2, netlify@0.2.2, bitballoon@0.2.2, update-notifier@0.2.2, heroku-client@1.5.0, request@2.60.0, js-yaml@3.3.1, aws-sdk@2.1.40, inquirer@0.8.5)
└── npm@2.13.2
Henry Snopek
@hhsnopek
Jul 28 2015 17:12
@t0t I don't see any errors in there? but I would start by removing fixing your node_modules by removing sudo
Sergio Forés
@t0t
Jul 28 2015 17:16
@hhsnopek If I don't use sudo when npm install -g roots, I get errors like npm ERR! error rolling back Error: EACCES, rmdir '/usr/local/lib/node_modules/roots'.
Henry Snopek
@hhsnopek
Jul 28 2015 17:16
npm doesn't need sudo, nore should it use sudo ever
you need to remove /usr/local/lib/node_modules
then reinstall all your global modules without sudo
Sergio Forés
@t0t
Jul 28 2015 17:17
I'll do so, thanks
Henry Snopek
@hhsnopek
Jul 28 2015 17:18
:+1: :)
Sergio Forés
@t0t
Jul 28 2015 17:21
ALL of them? I'll start by removing /usr/local/lib/node_modules/roots only... ;)
Henry Snopek
@hhsnopek
Jul 28 2015 17:21
it won't work then
because your node_modules folder is for sudoers only
Sergio Forés
@t0t
Jul 28 2015 17:22
ok, it's time to clean my node_modules... ;)
Henry Snopek
@hhsnopek
Jul 28 2015 17:23
haha don't worry many of us have used sudo in the past with npm
even myself, pain in the ass to fix
Sergio Forés
@t0t
Jul 28 2015 17:23
time to learn something new! thanks
Sergio Forés
@t0t
Jul 28 2015 17:32
@hhsnopek I removed node_modules folder, then did a npm install -g roots and got command not found: npm
Henry Snopek
@hhsnopek
Jul 28 2015 17:32
how did you install node?
Sergio Forés
@t0t
Jul 28 2015 17:34
I'll reinstall again now
Some months ago, I don't remember. I did from here: https://nodejs.org/
From the begining
I'll install this package node-v0.12.7.pkg
Sergio Forés
@t0t
Jul 28 2015 18:19
@hhsnopek After reinstalling Nodejs I get Access error. npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/roots' when doing npm install -g roots. The folder node_modules exists, and only has a npm folder within it now.
Is really a big problem using sudo?
Sergio Forés
@t0t
Jul 28 2015 18:29
Henry Snopek
@hhsnopek
Jul 28 2015 18:30
never had to do anything like that
how are you install nodejs?
thru brew, building locally, apt-get?
This section explains how to deal with sudo
any module you installed with sudo is basically in bad shape, and you should uninstall it
never use sudo to install global packages
Sergio Forés
@t0t
Jul 28 2015 18:48
I reinstalled node locally from downloaded node-v0.12.7.pkg installer.
Node was installed at

   /usr/local/bin/node

npm was installed at

   /usr/local/bin/npm
but I followed this tutorial to be able to install npm without sudo and now packages like roots are installed here:
roots@3.2.2 /Users/o0/npm/lib/node_modules/roots
Sergio Forés
@t0t
Jul 28 2015 18:54
yes, now I can install globally without sudo but I have a mess with PATHS... and roots watch doesnt run
Sergio Forés
@t0t
Jul 28 2015 19:26
Now all npm's are installed globally without sudo at /Users/o0/npm/node-modules
Henry Snopek
@hhsnopek
Jul 28 2015 19:27
so long as everything is symlink'ing properly you'll be okay
Sergio Forés
@t0t
Jul 28 2015 19:30
what symlink term means?
Sergio Forés
@t0t
Jul 28 2015 19:34
it seems node does not find/run roots now. Although both are installed. What's next?
Henry Snopek
@hhsnopek
Jul 28 2015 19:35
what happens when you run roots --help
Sergio Forés
@t0t
Jul 28 2015 19:35
➜  ~ git:(beta) ✗ roots --help
zsh: command not found: roots
Henry Snopek
@hhsnopek
Jul 28 2015 19:36
run which roots
Sergio Forés
@t0t
Jul 28 2015 19:36
➜  ~ git:(beta) ✗ which roots
roots not found
Henry Snopek
@hhsnopek
Jul 28 2015 19:37
roots isn't symlinked properly which means npm didn't symlink it to /usr/local/bin
Sergio Forés
@t0t
Jul 28 2015 19:38
There is a magical command to symlink again to the right place?
Henry Snopek
@hhsnopek
Jul 28 2015 19:39
haha if you know the path to where npm has installed roots
the command would be: ln -s path/to/roots/bin /usr/local/bin/roots
npm should do that for you
if it's not doing that, then your installation of node/npm isn't right
hate to say it :/
Sergio Forés
@t0t
Jul 28 2015 19:41
I'll try it now, thks ;P
Henry Snopek
@hhsnopek
Jul 28 2015 19:41
are you on OSX?
Sergio Forés
@t0t
Jul 28 2015 19:41
yes
Henry Snopek
@hhsnopek
Jul 28 2015 19:41
use brew to install node
it'll automatically install npm for you
Sergio Forés
@t0t
Jul 28 2015 19:42
it sounds good...
Henry Snopek
@hhsnopek
Jul 28 2015 19:42
if you want to get fancy with it, after you install node with brew, you can install https://www.npmjs.com/package/n to install diff node/iojs versions
Sergio Forés
@t0t
Jul 28 2015 20:25
➜  ~ git:(beta) ✗ brew link --overwrite node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
Henry Snopek
@hhsnopek
Jul 28 2015 20:26
brew update; brew upgrade; brew doctor
Sergio Forés
@t0t
Jul 28 2015 20:26
How can I make that file writable?
Henry Snopek
@hhsnopek
Jul 28 2015 20:26
follow the output from brew doctor
Sergio Forés
@t0t
Jul 28 2015 20:26
yes, I did brew doctor
Henry Snopek
@hhsnopek
Jul 28 2015 20:27
what's outputted from brew link node
Sergio Forés
@t0t
Jul 28 2015 20:27
it seems there is only one step remaining
Henry Snopek
@hhsnopek
Jul 28 2015 20:27
without the overwrite flag
Sergio Forés
@t0t
Jul 28 2015 20:29
➜  systemtap git:(master) ✗ brew link node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink share/systemtap/tapset/node.stp
Target /usr/local/share/systemtap/tapset/node.stp
already exists. You may want to remove it:
  rm '/usr/local/share/systemtap/tapset/node.stp'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node
Henry Snopek
@hhsnopek
Jul 28 2015 20:30
use the remove cmd it gave you
Sergio Forés
@t0t
Jul 28 2015 20:30
it said:
➜  ~ git:(beta) ✗ rm '/usr/local/share/systemtap/tapset/node.stp'
override rw-r--r--  root/admin for /usr/local/share/systemtap/tapset/node.stp?
Henry Snopek
@hhsnopek
Jul 28 2015 20:31
sudo rm '/usr/local/share/systemtap/tapset/node.stp'
Sergio Forés
@t0t
Jul 28 2015 20:33
I deleted node.stp but tapset folder remains unwritable
Henry Snopek
@hhsnopek
Jul 28 2015 20:33
sudo rm -fr /usr/local/share/systemtap/tapset
wait
if you run brew link node it still says it's unwritable?
Sergio Forés
@t0t
Jul 28 2015 20:34
yes
Henry Snopek
@hhsnopek
Jul 28 2015 20:35
are there any contents within the tapset folder?
Sergio Forés
@t0t
Jul 28 2015 20:35
➜  ~ git:(beta) ✗ brew link node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink share/systemtap/tapset/node.stp
/usr/local/share/systemtap/tapset is not writable.
Henry Snopek
@hhsnopek
Jul 28 2015 20:35
ls share/systemtap/tapset
Sergio Forés
@t0t
Jul 28 2015 20:35
nope
Henry Snopek
@hhsnopek
Jul 28 2015 20:35
sudo rm -fr /usr/local/share/systemtap/tapset
get rid of it
then try the link
if it persists then your share folder likely has the incorrect permissions
Sergio Forés
@t0t
Jul 28 2015 20:39
yes, share folder has incorrect permissions.
it persists
➜  ~ git:(beta) ✗ brew link --overwrite node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink lib/dtrace/node.d
/usr/local/lib/dtrace is not writable.
oh no this is a nightmare... :)
A permissions nightmare
Henry Snopek
@hhsnopek
Jul 28 2015 20:45
sudo chmod drwxr-xr-x /usr/local/share
Sergio Forés
@t0t
Jul 28 2015 20:46
➜  local git:(master) ✗ sudo chmod drwxr-xr-x /usr/local/share
chmod: Invalid file mode: drwxr-xr-x
Henry Snopek
@hhsnopek
Jul 28 2015 20:48
crap sorry!
sudo chmod 755 /usr/local/share
Sergio Forés
@t0t
Jul 28 2015 20:50
local git:(master) ✗ sudo chmod 755 /usr/local/share       
➜  local git:(master) ✗ brew link node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink share/systemtap
/usr/local/share is not writable.
wtf! haha, share have to be writable now. 755 means writable
Henry Snopek
@hhsnopek
Jul 28 2015 20:51
l /usr/local/share
if that's drwxr-xr-x then check systemtap
you might have to scour google for some answers, I'm out of them haha
Sergio Forés
@t0t
Jul 28 2015 20:53
drwxr-xr-x 9 root admin 306B 28 jul 23:01 share
Henry Snopek
@hhsnopek
Jul 28 2015 20:54
l /usr/local/share/systemtap
the output of the permissions should be the same as share
Sergio Forés
@t0t
Jul 28 2015 20:55
systemtap is gone. Probably removed by me...
Henry Snopek
@hhsnopek
Jul 28 2015 20:56
mkdir /usr/local/share/systemtap
Sergio Forés
@t0t
Jul 28 2015 20:57
ok drwxr-xr-x 2 root admin 68B 28 jul 23:13 systemtap
Henry Snopek
@hhsnopek
Jul 28 2015 20:57
now run brew link node
Sergio Forés
@t0t
Jul 28 2015 20:58
➜  ~ git:(beta) ✗ brew link node
Linking /usr/local/Cellar/node/0.12.7... 
Error: Could not symlink share/systemtap/tapset
/usr/local/share/systemtap is not writable.
is not possible!
Henry Snopek
@hhsnopek
Jul 28 2015 20:58
yup I'm out of ideas
scour google a bit :P
Sergio Forés
@t0t
Jul 28 2015 20:58
@hhsnopek thankyou very much, I´ll google. ;)
Henry Snopek
@hhsnopek
Jul 28 2015 20:59
haha no probs
Mathias Biilmann
@biilmann
Jul 28 2015 20:59
@t0t the folder only has write access as root
that’s why it won’t let you link without sudo
Henry Snopek
@hhsnopek
Jul 28 2015 21:00
how didn't I notice that O.o
thank you @biilmann
Sergio Forés
@t0t
Jul 28 2015 21:01
then i must use sudo brew link node?
Henry Snopek
@hhsnopek
Jul 28 2015 21:01
we want to get rid of sudo usage
whoami
Sergio Forés
@t0t
Jul 28 2015 21:01
I am o0
this is my uer
user
Henry Snopek
@hhsnopek
Jul 28 2015 21:02
you need to replace root with o0
Sergio Forés
@t0t
Jul 28 2015 21:03
how I do that (I promise is my last question for today.. haha ) ;)
don't worry I'll google for this.
thanks!
Mathias Biilmann
@biilmann
Jul 28 2015 21:24
sudo chown -R oO:admin /usr/local/share/systemtap
Sergio Forés
@t0t
Jul 28 2015 21:24
eureka
➜  ~ git:(beta) ✗ sudo chown -R `whoami` /usr/local
Password:
➜  ~ git:(beta) ✗ brew link --overwrite node
Linking /usr/local/Cellar/node/0.12.7... 6 symlinks created
I'm gonna test if all works fine...
Sergio Forés
@t0t
Jul 28 2015 21:39
Finally I seems symlinks are set.
➜  share git:(master) ✗ brew link node
Warning: Already linked: /usr/local/Cellar/node/0.12.7
Henry Snopek
@hhsnopek
Jul 28 2015 21:40
npm -v
Sergio Forés
@t0t
Jul 28 2015 21:40
2.12.1
Henry Snopek
@hhsnopek
Jul 28 2015 21:40
node -v
Sergio Forés
@t0t
Jul 28 2015 21:40
v0.12.7
Henry Snopek
@hhsnopek
Jul 28 2015 21:40
you're all set!
Sergio Forés
@t0t
Jul 28 2015 21:42
almost...
➜  maderlim git:(master) roots watch
zsh: command not found: roots
➜  maderlim git:(master) roots --help
zsh: command not found: roots
Henry Snopek
@hhsnopek
Jul 28 2015 21:42
npm i -g roots
Sergio Forés
@t0t
Jul 28 2015 21:43
➜  maderlim git:(master) npm i -g roots

> fsevents@0.3.6 install /Users/o0/npm/lib/node_modules/roots/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

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node
/Users/o0/npm/bin/roots -> /Users/o0/npm/lib/node_modules/roots/bin/roots

> roots@3.2.2 postinstall /Users/o0/npm/lib/node_modules/roots
> node ./post_install.js

---------------------------------------------------------
Roots uses analytics to help the core team to get a
better view of how developers use roots. All analytics
are collected anonymously, and analytics data is used
only to make roots better for everyone. However, if you
would like to disable analytics, you are welcome to do
so by running the command `roots analytics --disable`

Much like roots itself, roots' analytics are open source.
Check out http://roots.cx/analytics for more information.
---------------------------------------------------------
roots@3.2.2 /Users/o0/npm/lib/node_modules/roots
├── graceful-fs@4.1.2
├── open@0.0.5
├── colors@1.1.2
├── osenv@0.1.3 (os-tmpdir@1.0.1, os-homedir@1.0.1)
├── vinyl@0.5.0 (clone-stats@0.0.1, replace-ext@0.0.1, clone@1.0.2)
├── when@3.7.3
├── coffee-script@1.9.3
├── argparse@1.0.2 (sprintf-js@1.0.3)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── rimraf@2.4.2 (glob@5.0.14)
├── minimatch@2.0.10 (brace-expansion@1.1.0)
├── serve-static@1.10.0 (escape-html@1.0.2, parseurl@1.3.0, send@0.13.0)
├── readdirp@1.4.0 (readable-stream@1.0.33, minimatch@0.2.14)
├── configstore@0.3.2 (xdg-basedir@1.0.1, object-assign@2.1.1, user-home@1.1.1, graceful-fs@3.0.8, uuid@2.0.1, js-yaml@3.3.1)
├── keen.io@0.1.3 (underscore@1.5.2, superagent@0.21.0)
├── inquirer@0.9.0 (figures@1.3.5, strip-ansi@3.0.0, ansi-regex@2.0.0, cli-width@1.0.1, through@2.3.8, chalk@1.1.0, readline2@0.1.1, run-async@0.1.0, rx-lite@2.5.2)
├── update-notifier@0.5.0 (is-npm@1.0.0, configstore@1.2.0, semver-diff@2.0.0, string-length@1.0.1, chalk@1.1.0, repeating@1.1.3, latest-version@1.0.1)
├── chokidar@1.0.5 (arrify@1.0.0, path-is-absolute@1.0.0, is-glob@1.1.3, glob-parent@1.2.0, async-each@0.1.6, is-binary-path@1.0.1, anymatch@1.3.0, fsevents@0.3.6)
├── accord@0.20.1 (indx@0.2.3, convert-source-map@1.1.1, fobject@0.0.3, glob@5.0.14, semver@4.3.6, resolve@1.1.6, uglify-js@2.4.24)
├── lodash@3.10.0
├── charge@0.0.4 (infestor@0.3.0, minimist@1.1.2, node-uuid@1.4.3, anti-matter@0.0.1, chalk@1.0.0, lodash.assign@3.2.0, morgan@1.6.1, escapist-middleware@0.0.2, archivist-middleware@0.0.2, alchemist-middleware@0.0.4, hygienist-middleware@0.0.3, pathologist-middleware@0.0.1, connect@3.4.0, lodash.remove@3.1.0, compression@1.5.1, faye-websocket@0.9.4, publicist-middleware@0.0.1, apology-middleware@0.0.4)
├── sprout@0.4.3 (isbinaryfile@2.0.4, ncp@2.0.0, which@1.1.1, underscore.string@3.0.3, ejs@2.3.3, coffee-script@1.9.2, readdirp@1.3.0, rimraf@2.3.4, bluebird@2.9.34, js-yaml@3.3.1, lodash@3.8.0)
├── ship@0.2.4 (indx@0.2.3, mime@1.3.4, fstream@1.0.7, argparse@0.1.16, minimatch@1.0.0, file-map@0.0.1, optimist@0.6.1, tar@1.0.3, coffee-script@1.8.0, ftp@0.3.10, github@0.2.1, ssh2@0.3.6, lodash@2.4.2, netlify@0.2.2, bitballoon@0.2.2, update-notifier@0.2.2, heroku-client@1.5.0, request@2.60.0, js-yaml@3.3.1, aws-sdk@2.1.40, inquirer@0.8.5)
└── npm@2.13.2
Henry Snopek
@hhsnopek
Jul 28 2015 21:44
roots -v
Sergio Forés
@t0t
Jul 28 2015 21:44
➜  maderlim git:(master) roots -v
zsh: command not found: roots
Henry Snopek
@hhsnopek
Jul 28 2015 21:44
oh wait
you need xcode installed
Sergio Forés
@t0t
Jul 28 2015 21:46
I'll install Xcode now
Adam Argyle
@argyleink
Jul 28 2015 22:39

site.posts.all() is telling me it's undefined if i create a nested folder set and don't include a jade file in the posts roots folder. got a few screenshots to help articulate what i mean =)

or not, images wont upload right now

if i have:
posts

folder1
folder2
folder3

i get the error that site.posts.all() is undefined, while site.posts.folder1

if i have:
posts

folder1
folder2
folder3
post.jade

it works

ideas?