Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run node_modules/.bin/browserifyinc. Ensure you have installed it with npm

Unable to run node_modules/.bin/browserifyinc. Ensure you have installed it with npm. (in /Users/labuser/Downloads/betfair_nav_demo-master/app/assets/javascripts/application.js)

I am using Ampersand JS with Rails application. gem 'rails', '4.2.1' gem "browserify-rails", '1.2.0'

I have installed npm install ampersand -g

npm install browserify --save-dev

npm install underscore --save

My Rails app is working without browserify-rails gem.

like image 993
KrunaL Avatar asked Aug 04 '15 18:08

KrunaL


1 Answers

Try running

npm install browserify-incremental

It is best, however, to save this to a package.json file (so that when you deploy your code, you only have to run npm install, as you would bundle install).

If you don't have a package.json file, create one by running:

npm init

in your rails project's root directory.

Once you've done this, or if you already have a package.json file, you can save packages to it by running:

npm install --save <package_name>

If you have existing node packages installed in this project, npm init will automatically add these to your package.json file. If npm init prompts you for something that you're not sure of, or is not applicable to your application, just press enter and tidy up the package.json file afterwards. You should only ever need to run npm init once.

like image 144
XtraSimplicity Avatar answered Oct 05 '22 23:10

XtraSimplicity