alex35mil / generator-flux-on-rails Goto Github PK
View Code? Open in Web Editor NEWScaffolder of universal Flux / Redux app, backed by Rails API.
Scaffolder of universal Flux / Redux app, backed by Rails API.
I want to try this project.
When I go to http://lvh.me/ Nginx returns Timeout after x seconds.
I'm debugging. I've commented this line:
https://github.com/alexfedoseev/generator-flux-on-rails/blob/master/app/templates/app/server.js#L33
And I've set up a dummy Express endpoint:
app.get('/', function (req, res) {
res.send('Hello World!');
});
This is working
So following this clue I'm checking this file: https://github.com/alexfedoseev/generator-flux-on-rails/blob/master/app/templates/app/app/libs/initters/server.jsx#L31
I see that this request is ok on Rails log
Started GET "/auth/preflight => 200
But from here I do not know what to check.
The thing is that the app ends returning timeout.
Getting this error when running generator. App part is generated but API part is not.
sudo yo flux-on-rails my-blog
OS: Ubuntu 14.04
npm ERR! Error: EACCES, mkdir '/home/developer/.npm/cssnano/2.6.1'
npm ERR! { [Error: EACCES, mkdir '/home/developer/.npm/cssnano/2.6.1']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/developer/.npm/cssnano/2.6.1',
npm ERR! parent: 'css-loader' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.16.0-46-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "autoprefixer-loader" "babel-eslint" "babel-loader" "chunk-manifest-webpack-plugin" "compression-webpack-plugin" "css-loader" "del" "eslint" "eslint-plugin-babel" "eslint-plugin-react" "extract-text-webpack-plugin" "gulp" "gulp-changed" "gulp-if" "gulp-imagemin" "gulp-util" "node-notifier" "react-hot-loader" "redux-devtools" "run-sequence" "style-loader" "stylus-loader" "webpack" "webpack-dev-server" "webpack-manifest-plugin" "chai" "jsdom" "mocha" "sinon" "--save-dev" "--loglevel" "error"
npm ERR! cwd /home/developer/Desktop/RAILS/my-blog/my-blog-app
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! path /home/developer/.npm/cssnano/2.6.1
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/developer/.npm/cssnano/2.6.1'
npm ERR! not ok code 0
Completed.
$ npm shrinkwrap --loglevel error
npm ERR! Error: Problems were encountered
npm ERR! Please correct and try again.
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/eslint-plugin-babel
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/eslint-plugin-react
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/compression-webpack-plugin
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/webpack-manifest-plugin
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/babel-loader
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/chai
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/extract-text-webpack-plugin
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/redux-devtools
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/sinon
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/style-loader
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/autoprefixer-loader
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/chunk-manifest-webpack-plugin
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/gulp-changed
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/mocha
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/run-sequence
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/babel-eslint
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/gulp-if
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/stylus-loader
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/jsdom
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/node-notifier
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/webpack-dev-server
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/del
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/gulp
npm ERR! extraneous: [email protected] /home/developer/Desktop/RAILS/my-blog/my-blog-app/node_modules/gulp-util
npm ERR! at shrinkwrap_ (/usr/lib/node_modules/npm/lib/shrinkwrap.js:30:15)
npm ERR! at /usr/lib/node_modules/npm/lib/shrinkwrap.js:24:5
npm ERR! at /usr/lib/node_modules/npm/lib/ls.js:45:30
npm ERR! at /usr/lib/node_modules/npm/node_modules/read-installed/read-installed.js:130:5
npm ERR! at /usr/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb (/usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! at /usr/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb (/usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! at /usr/lib/node_modules/npm/node_modules/read-installed/read-installed.js:244:14
npm ERR! at cb (/usr/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Linux 3.16.0-46-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "shrinkwrap" "--loglevel" "error"
npm ERR! cwd /home/developer/Desktop/RAILS/my-blog/my-blog-app
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/developer/Desktop/RAILS/my-blog/my-blog-app/npm-debug.log
npm ERR! not ok code 0
Completed.
events.js:72
throw er; // Unhandled 'error' event
^
Error: ENOENT, no such file or directory '/home/developer/Desktop/RAILS/my-blog/my-blog-api/Gemfile'
at Object.fs.openSync (fs.js:439:18)
at Object.fs.readFileSync (fs.js:290:15)
at readFileAsString (/usr/lib/node_modules/generator-flux-on-rails/node_modules/yeoman-generator/lib/actions/wiring.js:277:13)
at api.editGemfile (/usr/lib/node_modules/generator-flux-on-rails/app/index.js:370:64)
at module.exports.yeoman.generators.Base.extend.writing.scaffoldApi (/usr/lib/node_modules/generator-flux-on-rails/app/index.js:509:16)
at /usr/lib/node_modules/generator-flux-on-rails/node_modules/yeoman-generator/lib/base.js:409:16
at processImmediate as _immediateCallback
Running mina setup
& mina deploy
on selected server doesn't render the configs files. (Located in the mina templates directory)
gulp start:dev
[17:43:33] Failed to load external module babel-register [17:43:33] Requiring external module babel-core/register /home/eddie/projects/isomorphic-react/isomorphic-react-app/node_modules/babel-core/lib/transformation/file/logger.js:41 throw new Constructor(this._buildMessage(msg)); ^ ReferenceError: [BABEL] /home/eddie/projects/isomorphic-react/isomorphic-react-app/gulpfile.babel.js: Using removed Babel 5 option: base.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
after first gulp
my-blog-app rbenv:(2.2.3) git:(master) โ gulp
[00:42:35] Requiring external module babel-core/register
/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/logger.js:41
throw new Constructor(this._buildMessage(msg));
^
ReferenceError: [BABEL] /Users/stereodenis/work/test/my-blog/my-blog-app/gulpfile.babel.js: Unknown option: base.stage
at Logger.error (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:262:18)
at OptionManager.init (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/index.js:190:75)
at new File (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/file/index.js:121:22)
at Pipeline.transform (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/transformation/pipeline.js:42:16)
at Object.transformFileSync (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-core/lib/api/node.js:116:10)
at compile (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-register/lib/node.js:102:20)
at loader (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-register/lib/node.js:130:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/stereodenis/work/test/my-blog/my-blog-app/node_modules/babel-register/lib/node.js:140:7)
Hello! I wanted to try this out but bare with me as this is my first time to try out generator's and npm's. I have small experience with React and Flux with the react-rails
but I want to make rails as an API as well and start react+flux as universal javascript and this is where I got to. Now when I generated this generator with just the NodeApp
and did an npm start
I get this error:
-> % npm start
> [email protected] start /Users/alice/Sites/flux-on-rails/test-app/test-app-app
> gulp start:dev
[11:14:09] Requiring external module babel-register
/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/logger.js:39
throw new Constructor(this._buildMessage(msg));
^
ReferenceError: [BABEL] /Users/alice/Sites/flux-on-rails/test-app/test-app-app/gulpfile.babel.js: Using removed Babel 5 option: base.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets
at Logger.error (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/logger.js:39:11)
at OptionManager.mergeOptions (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:20)
at OptionManager.init (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/options/option-manager.js:465:10)
at File.initOptions (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/index.js:194:75)
at new File (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/file/index.js:123:22)
at Pipeline.transform (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/transformation/pipeline.js:45:16)
at Object.transformFileSync (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-core/lib/api/node.js:124:10)
at compile (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-register/lib/node.js:98:20)
at loader (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-register/lib/node.js:126:14)
at Object.require.extensions.(anonymous function) [as .js] (/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/babel-register/lib/node.js:136:7)
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/5.7.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `gulp start:dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'gulp start:dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the test-app-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp start:dev
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs test-app-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls test-app-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/alice/Sites/flux-on-rails/test-app/test-app-app/npm-debug.log
Have I forgotten other things to install via npm
? I also attach here the npm-debug.log
:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/5.7.1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/alice/Sites/flux-on-rails/test-app/test-app-app/node_modules/.bin:/Users/alice/.rvm/gems/ruby-2.2.1@test-app/bin:/Users/alice/.rvm/gems/ruby-2.2.1@global/bin:/Users/alice/.rvm/rubies/ruby-2.2.1/bin:/Users/alice/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle [email protected]~start: CWD: /Users/alice/Sites/flux-on-rails/test-app/test-app-app
11 silly lifecycle [email protected]~start: Args: [ '-c', 'gulp start:dev' ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `gulp start:dev`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at EventEmitter.emit (events.js:185:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:100:13)
14 verbose stack at ChildProcess.emit (events.js:185:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/alice/Sites/flux-on-rails/test-app/test-app-app
17 error Darwin 15.0.0
18 error argv "/usr/local/Cellar/node/5.7.1/bin/node" "/usr/local/bin/npm" "start"
19 error node v5.7.1
20 error npm v3.6.0
21 error code ELIFECYCLE
22 error [email protected] start: `gulp start:dev`
22 error Exit status 1
23 error Failed at the [email protected] start script 'gulp start:dev'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the test-app-app package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error gulp start:dev
23 error You can get information on how to open an issue for this project with:
23 error npm bugs test-app-app
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls test-app-app
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Hello
My env :
Ubuntu 14.04
RVM with ruby 2.2.3
NVM with node 4.2.2
The generator fails at the rails-api part.
Here is the relevant stacktrace:
----> Installing `rails-api` gem...
$ rvm ruby-2.2.3@attract do gem install rails-api --quiet
Successfully installed thor-0.19.1
Successfully installed thread_safe-0.3.5
Successfully installed minitest-5.8.3
Successfully installed tzinfo-1.2.2
Successfully installed i18n-0.7.0
Successfully installed activesupport-4.2.5
Successfully installed rails-deprecated_sanitizer-1.0.3
Successfully installed mini_portile2-2.0.0
Building native extensions. This could take a while...
ERROR: Error installing rails-api:
ERROR: Failed to build gem native extension.
/home/pak/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151130-27082-bpuagn.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/pak/.rvm/rubies/ruby-2.2.3/bin/$(RUBY_BASE_NAME)
--help
--clean
/home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile'
from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror'
from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile'
from extconf.rb:80:in `nokogiri_try_compile'
from extconf.rb:87:in `block in add_cflags'
from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags'
from extconf.rb:86:in `add_cflags'
from extconf.rb:336:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/pak/.rvm/gems/ruby-2.2.3@attract/gems/nokogiri-1.6.7 for inspection.
Results logged to /home/pak/.rvm/gems/ruby-2.2.3@attract/extensions/x86_64-linux/2.2.0/nokogiri-1.6.7/gem_make.out
Completed.
----> Creating Rails app...
$ rvm ruby-2.2.3@attract do rails-api new attract-api --skip-sprockets --skip-bundle --quiet --database=postgresql
/home/pak/.rvm/scripts/set: line 19: exec: rails-api: not found
Completed.
Thank you for your help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.