0

I am trying to install web pack with browserify with this:

browserify main.js > bundle.js

following these instructions: https://github.com/petehunt/webpack-howto

Terminal keeps showing:

browserify: command not found

even after running

npm install -g browserify

Tried using solutions from Cannot find module 'browserify' and Browserify command not found.

Here's the console window:

https://gist.github.com/robojukie/b6ca2443f02511d05f372eefc132e3a0

How can I figure out what is wrong and how to fix it?

Community
  • 1
  • 1
matcha
  • 81
  • 1
  • 9

4 Answers4

1

A better answer is here. To quote:

Make sure that npm config get prefix/bin is in your $PATH.

jamjar
  • 625
  • 5
  • 13
0

Try this:

node_modules/.bin/browserify main.js > bundle.js
0

If you installed NPM with Brew test this

brew uninstall npm 

brew install npm 
Mathias Asberg
  • 3,562
  • 6
  • 30
  • 46
0

It is an old post but I believe people are still facing the same problem like me, so this was my solution:

<your project folder>/node_modules/browserify/bin/cmd.js main.js -o bundle.js