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
source to share
No one has answered this question yet
Check out similar questions: