Browser-laptop: Issue starting Brave browser locally for development

Created on 25 Dec 2016  路  3Comments  路  Source: brave/browser-laptop

Did you search for similar issues before submitting this one?
Yes

Describe the issue you encountered:
1) Pulled latest code into my forked version of Brave according to: https://help.github.com/articles/configuring-a-remote-for-a-fork/ and associated updating guide.
2) Ran npm run watch but got:

$ npm run watch

> [email protected] watch ~/repos/browser-laptop
> webpack-dev-server --inline --hot --colors --content-base=./app/extensions/brave

sh: webpack-dev-server: command not found

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "watch"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] watch: `webpack-dev-server --inline --hot --colors --content-base=./app/extensions/brave`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] watch script 'webpack-dev-server --inline --hot --colors --content-base=./app/extensions/brave'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the brave-browser package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack-dev-server --inline --hot --colors --content-base=./app/extensions/brave
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs brave-browser
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls brave-browser
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     ~/repos/browser-laptop/npm-debug.log

3) Ran brew upgrade node which returned: Error: node 7.3.0 already installed
4) Ran:

$ node -v
v6.9.2
$ npm -v
3.10.9
$ brew update
Already up-to-date.

Also tried running:
$ lsof -i :8080 which did not return anything, and read through: https://github.com/brave/browser-laptop/wiki/Troubleshooting to no avail.

Really not sure why my the development version of Brave won't start now.

Expected behavior:
Brave npm server starts normally and watches for changes in development.

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    macOS

Any insight or suggestions to get Brave running locally would be greatly appreciated!

Most helpful comment

Brilliant!! You guys were right. It works now. Thanks so much for the insight. @jonathansampson @luixxiul

All 3 comments

Did you do npm install?

I think @luixxiul is hinting in the right direction.

You'll need to run npm install, and let that succeed. Once it is finished, open two terminals. In the first terminal, run npm run watch, and wait for it to complete its warm-up. Once the first terminal has settled, run npm start from the second terminal.

You should now have a local instance of Brave running. Making changes to _some_ files will result in the browser refreshing. Making changes to _.less_ files will not necessarily show a clear refresh. Still other files may require you to close Brave, and run npm start again from the second terminal.

Brilliant!! You guys were right. It works now. Thanks so much for the insight. @jonathansampson @luixxiul

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbondy picture bbondy  路  3Comments

luixxiul picture luixxiul  路  3Comments

bsclifton picture bsclifton  路  3Comments

mykkymk picture mykkymk  路  3Comments

lukemulks picture lukemulks  路  3Comments