无法运行 node_modules/.bin/browserifyinc.确保您已使用 npm 安装它 [英] Unable to run node_modules/.bin/browserifyinc. Ensure you have installed it with npm

查看:65
本文介绍了无法运行 node_modules/.bin/browserifyinc.确保您已使用 npm 安装它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法运行 node_modules/.bin/browserifyinc.确保您已使用 npm 安装它.(在/Users/labuser/Downloads/betfair_nav_demo-master/app/assets/javascripts/application.js)

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)

我在 Rails 应用程序中使用 Ampersand JS.宝石导轨",4.2.1"gem "browserify-rails", '1.2.0'

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

我已经安装npm 安装&符号 -g

I have installed npm install ampersand -g

npm install browserify --save-dev

npm install browserify --save-dev

npm install 下划线 --save

npm install underscore --save

我的 Rails 应用在没有 browserify-rails gem 的情况下工作.

My Rails app is working without browserify-rails gem.

推荐答案

尝试运行

npm install browserify-incremental

然而,最好将其保存到 package.json 文件中(这样当您部署代码时,您只需运行 npm install,就像您将 bundle install).

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).

如果您没有 package.json 文件,请运行以下命令创建一个:

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

npm init

在 Rails 项目的根目录中.

in your rails project's root directory.

完成此操作后,或者如果您已有 package.json 文件,您可以通过运行以下命令将包保存到其中:

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>

如果您在此项目中安装了现有的节点包,npm init 会自动将它们添加到您的 package.json 文件中.如果 npm init 提示您输入一些您不确定或不适用于您的应用程序的内容,只需按 Enter 并在之后整理 package.json 文件.你应该只需要运行一次 npm init.

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.

这篇关于无法运行 node_modules/.bin/browserifyinc.确保您已使用 npm 安装它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆