osenvosem / react-mobx-boilerplate Goto Github PK
View Code? Open in Web Editor NEWReact + React Router + MobX boilerplate
License: MIT License
React + React Router + MobX boilerplate
License: MIT License
node -v
v4.4.7
should i use node v6 ?
let babelConfig = require('../package').babelConfig.server;
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
[nodemon] app crashed - waiting for file changes before starting...
Hey thanks for the great project! I am seeing one thing though that doesn't seem to be working quite right...the server side rendering. If i run the project in prod mode and curl or view source at "/notes" I don't actually see the rendered content for notes. Thanks a ton for this!
Total newb here trying to get started with your boilerplate. I have cloned, initialized, and then when I run npm start
I get:
react-mobx-boilerplate (master)$ npm start
> [email protected] start /home/gb/tmp/react-mobx-boilerplate
> NODE_ENV=development nodemon server/index.js -w server/
sh: 1: nodemon: not found
So, I install nodemon with npm install nodemon --save
and then I get:
react-mobx-boilerplate (master *)$ npm start
> [email protected] start /home/gb/tmp/react-mobx-boilerplate
> NODE_ENV=development nodemon server/index.js -w server/
[nodemon] 1.9.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /home/gb/tmp/react-mobx-boilerplate/server/**/*
[nodemon] starting `node server/index.js`
/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:204
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
^
ReferenceError: Unknown plugin "transform-decorators-legacy" specified in "base" at 0, attempted to resolve relative to "/home/gb/tmp/react-mobx-boilerplate/server"
at /home/gb/tmp/react-mobx-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:204:17
at Array.map (native)
at Function.normalisePlugins (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:20)
at OptionManager.mergeOptions (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:300:36)
at OptionManager.init (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-core/lib/transformation/file/options/option-manager.js:488:10)
at compile (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-register/lib/node.js:112:69)
at loader (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-register/lib/node.js:158:14)
at Object.require.extensions.(anonymous function) [as .js] (/home/gb/tmp/react-mobx-boilerplate/node_modules/babel-register/lib/node.js:168:7)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
I bet I'm missing something simple.
When deploying (my extended version of) the boilerplate to Heroku I noticed it was failing because it was depending on devDependencies while start:prod. I fixed it with the following code:
in server.js
if (process.env.NODE_ENV === 'development') { // Development const webpack = require('webpack'); const webpackDevServer = require('webpack-dev-server'); const webpackDevConfig = require('../webpack.dev.js');
Not sure if this is the correct approach, but it works :)
(the one other thing I needed was a json loader test inside webpack config for some modules)
Great boilerplate!
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.