rails web pack react - sprocket couldn't find file react-server

老子叫甜甜 提交于 2019-12-11 15:57:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!