react-webpack-rails-tutorial | react_on_rails gem , webpack , enabling the es7 and jsx | Frontend Framework library
kandi X-RAY | react-webpack-rails-tutorial Summary
kandi X-RAY | react-webpack-rails-tutorial Summary
If you would like to know more about ShakaCode, please read Who Is ShakaCode and Success the ShakaCode Way!. Please visit our forums!. We've got a category dedicated to react_on_rails. You can also join our slack room for some free advice. Email us for an invite.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-webpack-rails-tutorial
react-webpack-rails-tutorial Key Features
react-webpack-rails-tutorial Examples and Code Snippets
Community Discussions
Trending Discussions on react-webpack-rails-tutorial
QUESTION
For those familiar with the react-on-rails gem, or more generally, yarn:
Just today I updated my Node version to 8.8.1 via Homebrew. Now, when I attempt to run bundle && yarn && foreman start -f Procfile.dev
(or just yarn install), I get the following message:
error react-webpack-rails-tutorial@0.0.1: The engine "node" is incompatible with this module. Expected version "5.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
This is likely a very simple issue I am running into, but I have been unable to fix it after a few hours of debugging.
I tried manually updating my Node version in package.json to be that on my computer (did not seem to take effect whatsoever), downgrading my version to 5.10.0 via Homebrew (but was unable to), and even upgrading to the latest version of the gem which meant installing webpack as well.
No matter what I did, my local server startup (bundle && yarn && foreman start -f Procfile.dev
) still lead to the same error above. Any ideas for this poor soul?
ANSWER
Answered 2017-Oct-30 at 09:29I give you this list of checks to do from the react-webpack-rails-tutorial
github page
Basic Demo Setup
Be sure that you have Node installed! We suggest nvm, with node version v6.0 or above. See this article Updating and using nvm.
git clone git@github.com:shakacode/react-webpack-rails-tutorial.git cd react-webpack-rails-tutorial
- Check that you have Ruby 2.3.0 or greater
- Check that you're using the right version of node. Run nvm list to check. Use 5.5 or greater.
- Check that you have Postgres installed. Run which postgres to check. Use 9.4 or greater.
- Check that you have qmake installed. Run which qmake to check. If missing, follow these instructions: Installing Qt and compiling capybara-webkit
- Check that you have Redis installed. Run which redis-server to check. If missing, install with Homebrew (brew install redis) or follow these instructions.
- bundle install
- brew install yarn
- yarn
- rake db:setup
- foreman start -f Procfile.hot
- Open a browser tab to http://localhost:3000 for the Rails app example with HOT RELOADING
- Try Hot Reloading steps below!
- foreman start -f Procfile.static
- Open a browser tab to http://localhost:3000 for the Rails app example.
- When you make changes, you have to refresh the browser page.
QUESTION
I'm trying to run npm install
inside my vagrant box but get this error:
ANSWER
Answered 2017-Jan-09 at 14:48I was struggling with this exact issue for quite a while as well. I was able to resolve it with the advice on here - https://github.com/mitchellh/vagrant/issues/7163
Scroll down to the second last comment and follow those steps to move your node_modules folder out of the shared folder, that should fix everything for you.
For ease here's the comment
There are some issues with installing the node packages directly in the shared folder. A good workaround is to install the packages somewhere inside the vm then create a symlink.
Ex:
cd /vagrant
rm -rf node_modules
mkdir /home/vagrant/vagrant_node_modules
cp package.json /home/vagrant/vagrant_node_modules
cd /home/vagrant/vagrant_node_modules
npm install
cd /vagrant
ln -s /home/vagrant/vagrant_node_modules/node_modules node_modules
ls -ld node_modules
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-webpack-rails-tutorial
git clone git@github.com:shakacode/react-webpack-rails-tutorial.git
cd react-webpack-rails-tutorial
Check that you have Ruby 2.3.0 or greater
Check that you're using the right version of node. Run nvm list to check. Use 5.5 or greater.
Check that you have Postgres installed. Run which postgres to check. Use 9.4 or greater.
Check that you have Redis installed. Run which redis-server to check. If missing and on MacOS, install with Homebrew (brew install redis)
bundle install
brew install yarn
yarn
rake db:setup
foreman start -f Procfile.hot
Open a browser tab to http://localhost:3000 for the Rails app example with HOT RELOADING
Try Hot Reloading steps below!
foreman start -f Procfile.static
Open a browser tab to http://localhost:3000 for the Rails app example.
When you make changes, you have to refresh the browser page.
foreman start -f Procfile.express
Open a browser tab to http://localhost:4000 for the Hot Module Replacement Example just using an express server (no Rails involved). This is good for fast prototyping of React components. However, this setup is not as useful now that we have hot reloading working for Rails!
Try Hot Reloading steps below!
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page