-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React導入 #9
Comments
DockerにNode入っていたけど、v4と古いのでv8入れるようなDockerfile書かないと |
http://tech.mof-mof.co.jp/blog/try-rails5-1-0-with-webpacker-react.html
|
|
先にこれを実行する必要がありそう |
root@9763cb1ef4f8:/share# rails webpacker:install:react
Webpacker is installed 🎉 🍰
Using /share/config/webpacker.yml file for setting up webpack paths
Copying react preset to your .babelrc file
Copying react example entry file to /share/app/javascript/packs
create app/javascript/packs/hello_react.jsx
Updating webpack paths to include .jsx file extension
insert config/webpacker.yml
Installing all react dependencies
run yarn add react react-dom babel-preset-react prop-types from "."
yarn add v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@rails/webpacker > postcss-cssnext@3.1.0" has unmet peer dependency "caniuse-lite@^1.0.30000697".
warning " > webpack-dev-server@3.1.4" has unmet peer dependency "webpack@^4.0.0-beta.1".
warning "webpack-dev-server > webpack-dev-middleware@3.1.3" has unmet peer dependency "webpack@^4.0.0".
error An unexpected error occurred: "EIO: i/o error, scandir '/share/node_modules/escope/powered-test'".
info If you think this is a bug, please open a bug report with the information provided in "/share/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Webpacker now supports react.js 🎉 |
これでいいのか・・・? |
ログが出ない・・・ |
自己解決→デフォルトのトップじゃだめだった。なにかしらコントローラー使うようなページじゃないと・・・ |
|
Nooooooo |
rails/webpacker#1303 (comment)
で動いた。 |
WDSうんたらってでる |
webpacker.ymlを修正したら動いた dev_server:
host: 0.0.0.0
port: 3035
public: localhost:3035 |
ぬーん |
Rails5.1系からは
としてやればReact環境込みでRailsアプリが作れるようになってる
The text was updated successfully, but these errors were encountered: