Browserify cannot find module

I am trying to include react component in my rails application. React works, but Browserify can't find the component.

Error: Cannot find module 'react-typeahead' from '/Users/xxx/code/xxx/app/assets/javascripts/react'

      

I have used bower to add react-typeahead to vendor/assets/components

and I am trying to enable it with:config.browserify_rails.paths << /vendor\/assets\/\/components\/\/react-typeahead\//

How can I get Browserify to load the component?

+3
ruby-on-rails reactjs browserify


source to share


No one has answered this question yet

Check out similar questions:

nineteen
Browserify cannot find npm module
fourteen
Getting "Error: Module cannot be found" with browser, gulp, react.js
6
Heroku + browser-rails: error: cannot find module
6
Cannot find module 'browserify'
2
Rails, React, Browserify, real-rails gem - Can't find module
2
Browserify: Can't find module "..." from "..." (Coffeescript + React)
2
Browser work with ReachjJS and yii2 tracing
1
Browserify cannot find local module
0
Rails and React, loading react type component with requirement
0
Browserify-rails cannot load js files containing JSX



All Articles
Loading...
X
Show
Funny
Dev
Pics