问题
I am trying to install react through webpack using rails 4.2.7
I followed this one https://github.com/rails/webpacker and stuck with the error
Sprockets::FileNotFound at /
couldn't find file 'react-server' with type 'application/javascript'
Checked in these paths:
/Users/dev/Documents/ff/app/assets/images
/Users/dev/Documents/ff/app/assets/javascripts
/Users/dev/Documents/ff/app/assets/stylesheets
/Users/dev/Documents/ff/vendor/assets/javascripts
/Users/dev/Documents/ff/vendor/assets/stylesheets
Any help is appreciated
回答1:
it's nothing to do with webpack, I have installed react-rails earlier and those files conflicted with webpack. Completely removed the older react-rails files and got it working.
来源:https://stackoverflow.com/questions/46240966/rails-web-pack-react-sprocket-couldnt-find-file-react-server