It is very interesting that I get an error when using this command:
ottergram documents$ browser-sync -v
-bash: browser-sync: command not found
There is no error when i precede the command with “npm”:
ottergram documents$ npm browser-sync -v
3.10.10
I get an error when I start the webpage:
ottergram documents$ browser-sync start --server --browser “Google Chrome” --files “stylesheets/*.css, *.html”
-bash: browser-sync: command not found
But when I precede the start command with “npm” the error is more informative but still ng:
ottergram documents$ npm ottergram documents$ browser-sync start --server --browser “Google Chrome” --files "stylesheets/*.css, .html"
-bash: browser-sync: command not found
Usage: npm
where is one of:
** access, adduser, bin,*
where is one of:
** access, adduser, bin,**
etc…
Here are the files in my ottergram folder:
ottergram documents$ ls
ottergram documents$ ls
img index.html npm-debug.log stylesheets
here is npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘start’,
1 verbose cli ‘browser-sync’ ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 verbose stack Error: ENOENT: no such file or directory, open '/Users/documents/front-end-dev-book/ottergram/package.json’
4 verbose stack at Error (native)
5 verbose cwd /Users/documents/front-end-dev-book/ottergram
6 error Darwin 16.4.0
7 error argv “/usr/local/bin/node” “/usr/local/bin/npm” “start” "browser-sync"
8 error node v6.10.0
9 error npm v3.10.10
10 error path /Users/documents/front-end-dev-book/ottergram/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/Users/documents/front-end-dev-book/ottergram/package.json’
15 error enoent ENOENT: no such file or directory, open '/Users/documents/front-end-dev-book/ottergram/package.json’
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -2, true ]
safari is my default browser but I have chrome installed too