Git Product home page Git Product logo

aqua's Introduction

No longer maintained

Boilerplates can be a huge time sink to maintain and I've decieded to archive this project.

I started the work for upgrading to hapi v17 and using async/await instead of callbacks, that work can be found in the hapi-17-async-await branch.

Thanks for your interest in my projects.


Aqua

A website and user system starter.

Build Status

Features

  • Universal front-end website
    • Basic web pages ready to customize
    • Contact page with form to email
    • Account sign-up page
    • Login pages including forgot and reset password
  • My account area
    • Stub dashboard ready to customize
    • Settings screen to update contact info and login credentials
  • Admin back office
    • Stub dashboard ready to customize
    • Manage accounts, admins, groups and users
    • Use groups (like departments) for shared permissions
    • Granular permissions override group permissions

Live demo

url username password
https://getaqua.herokuapp.com/ root root

Technology

Server side, Aqua is built with the hapi framework. We're using MongoDB as a data store.

The front-end is built with React. We use Redux as our state container. Client side routing is done with React Router. We're using Gulp for the build system.

We use bcrypt for hashing secrets. If you have issues during installation related to bcrypt then refer to this wiki page.

API only

If you don't use React and/or would rather bring your own front-end, checkout Frame. It's just the HTTP API parts of Aqua.

Installation

$ git clone [email protected]:jedireza/aqua.git
$ cd aqua
$ npm install

Configuration

Simply edit config.js. The configuration uses confidence which makes it easy to manage configuration settings across environments. Don't store secrets in this file or commit them to your repository.

Instead, access secrets via environment variables. We use dotenv to help make setting local environment variables easy (not to be used in production).

Simply copy .env-sample to .env and edit as needed. Don't commit .env to your repository.

First time setup

WARNING: This will clear all data in the following MongoDB collections if they exist: accounts, adminGroups, admins, authAttempts, sessions, statuses, and users.

$ npm run first-time-setup

# > [email protected] first-time-setup /home/jedireza/projects/aqua
# > node first-time-setup.js

# MongoDB URL: (mongodb://localhost:27017/aqua)
# Root user email: [email protected]
# Root user password:
# Setup complete.

Running the app

$ npm start

# > [email protected] start /Users/jedireza/projects/aqua
# > gulp react && gulp

# [23:41:44] Using gulpfile ~/projects/aqua/gulpfile.js
# ...

Now you should be able to point your browser to http://127.0.0.1:8000/ and see the welcome page.

nodemon watches for changes in server code and restarts the app automatically. gulp and webpack watch the front-end files and re-build those automatically too.

We also pass the --inspect flag to Node so you have a debugger available. Watch the output of $ npm start and look for the debugging URL and open it in Chrome. It looks something like this:

chrome-devtools://devtools/remote/serve_file/@62cd277117e6f8ec53e31b1be58290a6f7ab42ef/inspector.html?experiments=true&v8only=true&ws=localhost:9229/node

Running in production

$ node server.js

Unlike $ npm start this doesn't watch for file changes. Also be sure to set these environment variables in your production environment:

  • NODE_ENV=production - This is important for many different optimizations, both server-side and with the front-end build files.
  • NPM_CONFIG_PRODUCTION=false - This tells $ npm install to not skip installing devDependencies, which we need to build the front-end files.

Have a question?

Any issues or questions (no matter how basic), open an issue. Please take the initiative to read relevant documentation and be proactive with debugging.

Want to contribute?

Contributions are welcome. If you're changing something non-trivial, you may want to submit an issue before creating a large pull request.

Running tests

Lab is part of the hapi ecosystem and what we use to write all of our tests.

$ npm test

# > [email protected] test /Users/jedireza/projects/aqua
# > lab -t 100 -S -T ./test/lab/transform -L --lint-options '{"extensions":[".js",".jsx"]}' ./test/lab/client-before.js ./test/client/ ./test/lab/client-after.js ./test/server/ ./test/lab/server-after.js ./test/misc/

#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ..................................................
#  ...............

# 865 tests complete
# Test duration: 6382 ms
# No global variable leaks detected
# Coverage: 100.00%
# Linting results: No issues

Targeted tests

If you'd like to run a specific test or subset of tests you can use the test-client and test-server scripts included in the package.json file.

You specificy the path(s) via the TEST_TARGET environment variable like:

$ TEST_TARGET=test/server/web/main.js npm run test-server

# or

$ TEST_TARGET=test/client/actions/api.js npm run test-client

License

MIT

Don't forget

What you build with Aqua is more important than Aqua.

aqua's People

Contributors

alex-dixon avatar brnomendes avatar henriquesa avatar ivanph avatar jedireza avatar justingreenberg avatar ldesplat avatar rstormsf avatar socksrust avatar vkvam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aqua's Issues

Preventing abusive signups

I see there is a feature to prevent abusive logins but nothing to prevent abusive number of signups. There is email verification but shouldn't there be a captcha at signup page?

Upgrade - Redux - Sass - More -

Hi there. I noticed you are planning to do some upgrades as mentioned here #66

I'm curious about your strategy/timing for this? I've worked with mean.io and I like what I see with aqua a great deal, however there are a few things that I do like about mean, and some other subjective things that I personally would prefer in my own setup. This led me to starting up a WIP POC as a fictitious framework playground.

https://github.com/hydrotik/node-hapi-react-redux-sass-typescript-mongo-webpack-hmr-gulp

Aqua has opened my eyes to a number of excellent solutions as I was exploring moving to Hapi. With my own flavor of environment, the directions I have been working most with is...

  • Using bash for some of the setup and management of processes.
  • Typescript and tsx (I actually created another issue in hapi-react-views about Typescript parsing as a huge barrier for me in terms of getting further with my project) jedireza/hapi-react-views#43
  • Sass
  • Redux
  • Externalizing routes to another config that can be controlled with Promptly
  • Organizing some of the folder structures to work a little bit more like mean.io (without the ecosystem-centric commercial undertone that I found with their philosophy)
  • With mean.io, the ability to scaffold modules via a bash script, Yeoman, or other tool
  • The idealistic/fantastical/naive notion that there might be a way to setup the system to support both Angular 2 and React as a front end with a lot of the business logic abstracted out and the rendering layer extending it, decoupling functionality from the rendering layer.

That being said, I'm not looking to build something that competes with Aqua as I'd love to share what I've done on my end with Aqua. The likelihood is I will end up using Aqua with my own flavor of preferences sprinkled on top:) If any of this is of interest to you, let me know. I plan to plug away at my project, but you have done a lot of work already so thank you kindly for that! Hopefully I can return the favor!

Cheers,
Donovan

Posible to use mongolab as remote mongodb? like drywall?

Hi,

I was wondering if it is possible to use a remote mongodb server like in your drywall repository?
By using the same set-up?

If not, i supose I need to create a new db inside local mongodb and then following the set-up?

Regards

ps. just started learning node and do like drywall!

deploying to heroku

thanks for the great app. Have added a bit ( of course) and trying (but failing) to deploy to heroku. The error log report says "This is most likely a problem with the aqua package, npm ERR! not with npm itself.", fairly frequently so looking for guidance. I'll copy in log below. Thanks for any assistance you can offer.

heroku logs
2015-04-09T04:17:41.390892+00:00 heroku[api]: Scale to web=1 by [email protected]
2015-04-09T04:17:41.483497+00:00 heroku[api]: Release v3 created by [email protected]
2015-04-09T04:17:41.483497+00:00 heroku[api]: Deploy 68e2a30 by [email protected]
2015-04-09T04:17:46.567029+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-09T04:17:48.139980+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-09T04:17:48.139999+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-09T04:17:48.736357+00:00 app[web.1]: 
2015-04-09T04:17:48.808620+00:00 app[web.1]: npm ERR! Linux 3.13.0-40-generic
2015-04-09T04:17:48.736354+00:00 app[web.1]: > [email protected] start /app
2015-04-09T04:17:48.793702+00:00 app[web.1]: sh: 1: gulp: not found
2015-04-09T04:17:48.815356+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-04-09T04:17:48.736349+00:00 app[web.1]: 
2015-04-09T04:17:48.736356+00:00 app[web.1]: > gulp
2015-04-09T04:17:48.815200+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-04-09T04:17:48.803358+00:00 app[web.1]: 
2015-04-09T04:17:48.809112+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-04-09T04:17:48.809336+00:00 app[web.1]: npm ERR! node v0.12.2
2015-04-09T04:17:48.810415+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-04-09T04:17:48.810612+00:00 app[web.1]: npm ERR! [email protected] start: `gulp`
2015-04-09T04:17:48.810235+00:00 app[web.1]: npm ERR! npm  v2.7.4
2015-04-09T04:17:48.811044+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'gulp'.
2015-04-09T04:17:48.811348+00:00 app[web.1]: npm ERR! not with npm itself.
2015-04-09T04:17:48.811194+00:00 app[web.1]: npm ERR! This is most likely a problem with the aqua package,
2015-04-09T04:17:48.810893+00:00 app[web.1]: npm ERR! 
2015-04-09T04:17:48.811887+00:00 app[web.1]: npm ERR!     npm owner ls aqua
2015-04-09T04:17:48.811611+00:00 app[web.1]: npm ERR!     gulp
2015-04-09T04:17:48.812117+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-04-09T04:17:48.811484+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-04-09T04:17:48.810742+00:00 app[web.1]: npm ERR! Exit status 127
2015-04-09T04:17:48.811762+00:00 app[web.1]: npm ERR! You can get their info via:
2015-04-09T04:17:48.814869+00:00 app[web.1]: 
2015-04-09T04:17:49.567957+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-09T04:17:49.568444+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-09T04:17:49.551309+00:00 heroku[web.1]: Process exited with status 1
2015-04-09T04:17:52.153401+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-09T04:17:53.351105+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-09T04:17:53.351082+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-09T04:17:53.977188+00:00 app[web.1]: 
2015-04-09T04:17:53.977195+00:00 app[web.1]: > [email protected] start /app
2015-04-09T04:17:53.977197+00:00 app[web.1]: > gulp
2015-04-09T04:17:53.977199+00:00 app[web.1]: 
2015-04-09T04:17:53.994832+00:00 app[web.1]: sh: 1: gulp: not found
2015-04-09T04:17:54.014855+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-04-09T04:17:54.008307+00:00 app[web.1]: npm ERR! Linux 3.13.0-40-generic
2015-04-09T04:17:54.014723+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-04-09T04:17:54.009919+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-04-09T04:17:54.008815+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-04-09T04:17:54.003295+00:00 app[web.1]: 
2015-04-09T04:17:54.011020+00:00 app[web.1]: npm ERR! not with npm itself.
2015-04-09T04:17:54.009062+00:00 app[web.1]: npm ERR! node v0.12.2
2015-04-09T04:17:54.010730+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'gulp'.
2015-04-09T04:17:54.010577+00:00 app[web.1]: npm ERR! 
2015-04-09T04:17:54.010288+00:00 app[web.1]: npm ERR! [email protected] start: `gulp`
2015-04-09T04:17:54.010900+00:00 app[web.1]: npm ERR! This is most likely a problem with the aqua package,
2015-04-09T04:17:54.009553+00:00 app[web.1]: npm ERR! npm  v2.7.4
2015-04-09T04:17:54.011599+00:00 app[web.1]: npm ERR!     npm owner ls aqua
2015-04-09T04:17:54.011474+00:00 app[web.1]: npm ERR! You can get their info via:
2015-04-09T04:17:54.011159+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-04-09T04:17:54.011284+00:00 app[web.1]: npm ERR!     gulp
2015-04-09T04:17:54.010425+00:00 app[web.1]: npm ERR! Exit status 127
2015-04-09T04:17:54.011734+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-04-09T04:17:54.014406+00:00 app[web.1]: 
2015-04-09T04:17:54.701274+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-09T04:17:54.686212+00:00 heroku[web.1]: Process exited with status 1
2015-04-09T04:17:56.442246+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=eum-signup.herokuapp.com request_id=162f3e0a-391f-4d9f-a9a7-42050a5026af fwd="73.42.123.101" dyno= connect= service= status=503 bytes=
2015-04-09T04:17:56.745745+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=eum-signup.herokuapp.com request_id=71d707ff-bc32-4990-8c70-3baa76bae466 fwd="73.42.123.101" dyno= connect= service= status=503 bytes=
2015-04-09T04:22:31.376502+00:00 heroku[api]: Deploy 95fbd1b by [email protected]
2015-04-09T04:22:31.376502+00:00 heroku[api]: Release v4 created by [email protected]
2015-04-09T04:22:31.613180+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-09T04:22:35.500257+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-09T04:22:37.520976+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-09T04:22:37.521049+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-09T04:22:38.460796+00:00 app[web.1]: 
2015-04-09T04:22:38.467347+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-04-09T04:22:38.467700+00:00 app[web.1]: npm ERR! node v0.12.2
2015-04-09T04:22:38.468310+00:00 app[web.1]: npm ERR! npm  v2.7.4
2015-04-09T04:22:38.399059+00:00 app[web.1]: > [email protected] start /app
2015-04-09T04:22:38.399060+00:00 app[web.1]: > gulp
2015-04-09T04:22:38.399053+00:00 app[web.1]: 
2015-04-09T04:22:38.399062+00:00 app[web.1]: 
2015-04-09T04:22:38.450838+00:00 app[web.1]: sh: 1: gulp: not found
2015-04-09T04:22:38.466698+00:00 app[web.1]: npm ERR! Linux 3.13.0-40-generic
2015-04-09T04:22:38.468655+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-04-09T04:22:38.468841+00:00 app[web.1]: npm ERR! [email protected] start: `gulp`
2015-04-09T04:22:38.469011+00:00 app[web.1]: npm ERR! Exit status 127
2015-04-09T04:22:38.469422+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'gulp'.
2015-04-09T04:22:38.469195+00:00 app[web.1]: npm ERR! 
2015-04-09T04:22:38.469611+00:00 app[web.1]: npm ERR! This is most likely a problem with the aqua package,
2015-04-09T04:22:38.469781+00:00 app[web.1]: npm ERR! not with npm itself.
2015-04-09T04:22:38.469917+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-04-09T04:22:38.470055+00:00 app[web.1]: npm ERR!     gulp
2015-04-09T04:22:38.470211+00:00 app[web.1]: npm ERR! You can get their info via:
2015-04-09T04:22:38.470353+00:00 app[web.1]: npm ERR!     npm owner ls aqua
2015-04-09T04:22:38.470517+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-04-09T04:22:38.473704+00:00 app[web.1]: 
2015-04-09T04:22:38.473961+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-04-09T04:22:38.474026+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-04-09T04:22:39.456464+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-09T04:22:39.430072+00:00 heroku[web.1]: Process exited with status 1
2015-04-09T04:23:28.795127+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=eum-signup.herokuapp.com request_id=73a611a0-1c35-4b41-9e0e-63584b865fa7 fwd="73.42.123.101" dyno= connect= service= status=503 bytes=
2015-04-09T04:23:29.255512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=eum-signup.herokuapp.com request_id=6750d266-30bf-41c1-8ea4-2d7ba27aaaab fwd="73.42.123.101" dyno= connect= service= status=503 bytes=
MetaTheGeek@Metas-MacBook-Pro eum-react (addPage) $

Hapi package is insecure

Hapi package is reported as having an insecure CORS vulnerability, and should be updated to the 11.x.x patched version. Quite a few other packages, including react need to be updates I believe. Thanks very much for a great react starter project.

Questions

Is there a place where how things fit together is discussed? There are a lot of files here and it's not clear to me what does what.

For example, is this a SPA? If so, why are there different routes on the server for the views?
Where is the client side router set up?
I see each page exports it's own routes for the client side router, but there are they bundled up?

Update field validation parsing

Looks like the validation errors from hapi or joi have changed. For example, when I submit the login form without entering an email address or username I get:

child "username" fails because ["username" is required]

When that should just say:

"username" is required

Deactivation of yourself as an admin

If I deactivate myself as an admin - I would expect immediate session invalidation and log out.
Example: if somebody has session cookies and another member deletes a user as a member of an org,
he might still have access if he keeps the cookies.

Aqua Node Stops after around an hour

I've set up a node test instance of aqua on a digital ocean droplet. It runs properly for around an hour and then breaks. Any ideas on why this may be happening?

Which NodeJS version?

The README doesn't specify which NodeJS version to use.

I do see this when running npm install:

npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
npm WARN engine [email protected]: wanted: {"node":">=4.0.0"} (current: {"node":"0.12.2","npm":"2.7.4"})

Adding a resolve.alias to Webpack configuration

Hi, i'm trying to use https://github.com/dataminr/react-components in Aqua, and it requires adding a RequestHandler alias for the application, like this:

resolve: {
    alias: {
        RequestHandler$: path.join(__dirname, 'path', 'to', 'request', 'library'),
    }
},

I tried changing the webpack.js file in Aqua to look like this:

    resolve: {
    alias: {
        RequestHandler$: path.join(__dirname, 'RequestHandler.js'),
    },
        extensions: ['', '.js', '.jsx']
    },

But it still does not resolve. Am i modifying the right place correctly?

Keep a Store in Context when new User Input Form is opened

Thank you for all the work you have generously shared with the Github community. I have spent a great deal of time learning how aqua functions but have run into a roadblock and can't pass.

When the following code is executed in Actions.js, I lose the instance of store that was created by the page currently displayed. I need to pass data from this lost Store to the new page loaded in the code below. What is the best practice for saving store state and data between URL changes without using a Modal form?

Fetch(request, function (err, response) {

            if (!err) {
                window.location.href = '/account';
                response.success = true;
            }

My goal is simply to pass a username to the new displayed URL so I can implement that as a foreign key in a new mongdb collection created in the new URL. I am reluctant to pass the data via a react-router param, but maybe that is the best approach? Can you comment?

Thank you for your time.

Password reset link is invalid

I am playin' around with the demo and noticed that the password reset email has an invalid link:

We received a request to reset the password for your account. You'll need this key to do it.

Key:
undefined/login/reset/[email protected]/88d8105a-6556-4ebc-92b9-6a3c1231231

Love,

The Plot Device

Understanding Users Accounts and Groups

Hi,

I have just come across this framework and it seems like a great jumping off place for a project i am playing with. However i am not quite understanding the logic behind the user management.

What i am looking to do is to create some ACL groups that users can belong to, only the admin can add/remove the user from that group, users can belong to multiple groups, and groups can have multiple users. I think i can do this using the Admin Groups and assigning the account to the user and the user to the admin group, but that seems like it has an additional necessary step? Would it not make more sense for all the user information to be in one object, Account and for that to be able to be allocated groups, that i can then query when requests hit the restAPI e.t.c?

I'm probably completely misunderstanding the setup here, so please do correct me if i am wrong!

Thanks

Gareth

Run on Heroku

Hi!
How can I run on heroku?
I try clone repo and push to heroku , but have 'Application Error'.
What I doing wrong?

System mailer connection errors

I'm excited to use Aqua for Hapi (dynamic route generation) and React (consistent client-server html). And the setup module is a nice touch. It was definitely a hassle to set up the database the first time with each new install. Now the problem.
I work with domains hosted on Network Solutions, Bluehost and Earthlink. None of these worked properly as a secure system mailer with Aqua. So, I ran a test.
Using foundeo to test support for the secure protocol layer, I found that Earthlink doesn't support SSL or TLS, and Network Solutions and Bluehost both support TLSv1.
For the test, nodemailer host and auth properties were set for each system mailer, port was set to 587, and secure was set to true. In both cases, the sign in form hung with a user name / password that had been created. The forgot password route generated:
Error: 2686104896:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:787:

Looking more closely with openssl run from the command line, Network Solutions returns a number of errors including "num=20:unable to get local issuer certificate", "num=27:certificate not trusted", "num=21:unable to verify the first certificate", "No client certificate CA names sent" and finally "Verify return code: 21 (unable to verify the first certificate)." Bluehost returns "num=20:unable to get local issuer certificate", "No client certificate CA names sent" and finally "Verify return code: 20 (unable to get local issuer certificate).
So, I have a few questions:
First, what's going on here? What is the local issuer certificate in this context?
Second, does secure email require a certificate on the smtp server side for each private domain?
Third, what works out-of-the-box? Is gmail with SSL (default configuration) the only option?

Windows install

For anyone trying to install under windows this may help to get aqua running:

When running install if you have bcrypt or other issues withing compiling try using the "--msvs-version=2013" flag: npm install --msvs-version=2013 (if you have that installed or try a later version if that is what you have). I had so slog though all the bcrypt install solutions find something that worked.

"npm run setup" threw an error on ./setup.js. I had to remove the "./" on line 7 ("setup" : "./setup.js") of package.json so windows would not complain.

"npm run setup" also just kept opening setup.js instead of prompting. I got it to run setup just using: node setup.js

I have it running, but have not tried the testing. I assume it may complain about the test paths also using "./" instead of "." in package.json. These may need to be changed too.

Frame

Hello,

I was wondering why you are not using your frame backend for aqua?

Faster development process

Just been developing a new application based on your project in the last few weeks and first to say, wonderful work. Although i've found a couple of issues which I think would be wonderful if we get fixed/changed, wanted to know your opinion:

  1. When developing, Every time a change is made and file is save the code triggers full cleaning and uglifying which takes a while and hence we have to wait for the updates to be visible on the front-end. Would be nice to separate the build for dev and production environment so when developing a lot of those steps are skipped.
  2. For the front-end when making changes currently we need to refresh the page, May I suggest BrowserSync?

$ npm test -> Error: Module did not self-register.

Here is what i get when i run $ npm test :

> [email protected] test /home/mb/dev/EBI
> lab -t 100 -S -T ./test/transform.js -L --lint-options '{"extensions":[".js",".jsx"]}' ./test/client-before.js ./test/client/ ./test/client-after.js ./test/misc/ ./test/server/

Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/home/mb/dev/EBI/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/mb/dev/EBI/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:34)
    at Module._compile (module.js:460:26)
    at Object.require.extensions.(anonymous function) [as .js] (/home/mb/dev/EBI/node_modules/lab/lib/coverage.js:34:28)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/mb/dev/EBI/node_modules/jsdom/lib/jsdom/browser/index.js:5:21)
    at Module._compile (module.js:460:26)
    at Object.require.extensions.(anonymous function) [as .js] (/home/mb/dev/EBI/node_modules/lab/lib/coverage.js:34:28)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/mb/dev/EBI/node_modules/jsdom/lib/jsdom.js:10:27)
    at Module._compile (module.js:460:26)
    at Object.require.extensions.(anonymous function) [as .js] (/home/mb/dev/EBI/node_modules/lab/lib/coverage.js:34:28)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/mb/dev/EBI/test/client-before.js:1:13)
    at Module._compile (module.js:460:26)
    at Object.require.extensions.(anonymous function) [as .js] (/home/mb/dev/EBI/node_modules/lab/lib/coverage.js:34:28)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /home/mb/dev/EBI/node_modules/lab/lib/cli.js:103:23
    at Array.forEach (native)
    at Object.internals.traverse (/home/mb/dev/EBI/node_modules/lab/lib/cli.js:99:19)
    at Object.exports.run (/home/mb/dev/EBI/node_modules/lab/lib/cli.js:48:29)
    at Object.<anonymous> (/home/mb/dev/EBI/node_modules/lab/bin/lab:3:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
npm ERR! Test failed.  See above for more details.

and here is my $ npm version :

{ aqua: '3.3.2',
  npm: '2.11.3',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.7',
  openssl: '1.0.1p',
  uv: '1.6.1',
  v8: '3.28.71.19',
  zlib: '1.2.8' }

Some idea ?

How to make aqua isomorphic?

Aqua has been a huge help so far, thank you @jedireza for taking the time to put something like this together. :)

I'm running into an issue trying to make the application isomorphic. Would you happen to have any words of wisdom or sample code that I can follow to get me over this hurdle?

Expected behavior of unlink a user

Currently it throws an error:

 {"msec":4.509436011314392,"error":"exception: '$unset' is empty. You must specify a field like so: {$unset: {<field>: ...}}","data":{"name":"MongoError","message":"exception: '$unset' is empty. You must specify a field like so: {$unset: {<field>: ...}}","errmsg":"exception: '$unset' is empty. You must specify a field like so: {$unset: {<field>: ...}}","code":9,"ok":0,"isBoom":true,"isServer":true,"data":null,"output":{"statusCode":500,"payload":{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"},"headers":{}}}}
Debug: internal, error

what does unlink a user should do?

deployment heroku

any helpful steps?

  1. setup dyno
  2. add mongolab addon
  3. deploy to heroku
    :-(

MongoLab 3 Auth Issue!

Hi,

I am having an authentication error with MongoLab. Is it because they started using mongo v3?
screen shot 2015-10-27 at 6 39 04 pm

Thank You!

npm install Centos 7 dependency issues

** NPM INSTALL **

[root@development aqua]# npm install
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm WARN unmet dependency /var/www/node/aqua/node_modules/lab requires handlebars@'2.x.x' but will load
npm WARN unmet dependency /var/www/node/aqua/node_modules/handlebars,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /var/www/node/aqua/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/node_modules/globule/node_modules/glob requires graceful-fs@'~1.2.0' but will load
npm WARN unmet dependency /var/www/node/aqua/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs,
npm WARN unmet dependency which is version 3.0.6
npm WARN unmet dependency /var/www/node/aqua/node_modules/gulp-less/node_modules/accord/node_modules/uglify-js requires async@'~0.2.6' but will load
npm WARN unmet dependency /var/www/node/aqua/node_modules/async,
npm WARN unmet dependency which is version 0.9.0
npm WARN unmet dependency /var/www/node/aqua/node_modules/jsdom/node_modules/request requires qs@'~2.3.1' but will load
npm WARN unmet dependency /var/www/node/aqua/node_modules/qs,
npm WARN unmet dependency which is version 2.4.1

** NPM RUN SETUP **

[root@development aqua]# npm run setup

> [email protected] setup /var/www/node/aqua
> ./setup.js

module.js:338
    throw err;
          ^
Error: Cannot find module './commands/insert_command'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/var/www/node/aqua/node_modules/mongodb/lib/mongodb/collection.js:5:21)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

npm ERR! Linux 3.10.0-123.8.1.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "setup"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] setup: `./setup.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] setup script './setup.js'.
npm ERR! This is most likely a problem with the aqua package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./setup.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls aqua
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/node/aqua/npm-debug.log

path to add features

  1. Modify manifest.js
    Create 2 routes for server-side react view:
    './server/web/signup_company': {}
    and api call:
    './server/api/signup_copmany': { basePath: '/api' }`

2)in both 2 files make sure to:


exports.register.attributes = {
    name: ''
};

don't currently understand how it works and why we need to do it

3)Client side:
add some component to client/pages/SIGNUP_COMPANY
make sure to have an index.jsx

4)Add entry for webpack in ./gulp/webpack.js

signup_company: './client/pages/signup_company/index'

this will generate a file like:

var feet = <script src="/public/pages/signup_company.min.js"></script>;

5)add that script into server-side page(which is in server/web/) folder and in your <Layout feet={feet}...</Layout>

I guess that is it?

what if we could just load ALL client side code in 1 file so we never have to deal with FOUC?
I guess that's what makes it not true SPA app.

Drywall / Aqua - Which one?

Hello jedireza,
First of all, thanks a lot for developing Drywall and Aqua. This has saved me a lot of trouble, and although I've never used NodeJS, I'm progressively learning the technologies you use by looking at the source code. I could never thank you enough for the impressive work you've done.

I actually have a website based on Drywall, and I'd like to implement a few features I need some clarification on.

-I'd need to detect online presence in order to display a list of currently connected users. For now, I'm using a "heartbeat" Ajax function that sends a request to the server every 10 seconds. The server then updates the user MongoDB document and sets a "lastActive" value to the current date. It seems to barely work, but I'm really not sure if that's the proper way to do it. I must say I'm worried about performance when server is updating hundreds of Mongo documents every second.

Also, I didn't manage to display of all online users (for instance, those whose lastActive date has a 30 seconds delta with the current date). I've looked at the /admin/users/ code, but I just can't seem to understand how you'd do a Mongo query with filters and list every user that conforms to it.
I think it would be pretty important to add that the online presence should be able to handle about ~10 000 users at the same time.

-In the future, we'll be developing an iOS/Android mobile app for the website. As a mobile developer, these are going to be native applications. To you, what would be the easiest user system to work with? Drywall, or Aqua?

Thanks in advance for your help, and keep up the awesome work.
Ulysse

$ npm run setup fail

Hi,
I'm trying Aqua.
My running mongodb is launch like this :
$ sudo docker run -p 27017:27017 -d mongo
i've done $ npm install and then $ npm run setup
and here what i've get :

> [email protected] setup /home/mb/dev/EBI
> ./setup.js

Project name: (Aqua) EBI
MongoDB URL: (mongodb://localhost:27017/aqua) mongodb://localhost:27017/EBI
Root user email: [email protected]
Root user password: 
System email: ([email protected]) 
SMTP host: (smtp.gmail.com) 
SMTP port: (465) 
SMTP username: ([email protected]) 
SMTP password: 
/home/mb/dev/EBI/node_modules/bcrypt/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/home/mb/dev/EBI/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/mb/dev/EBI/node_modules/bcrypt/bcrypt.js:3:35)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

npm ERR! Linux 3.16.0-45-generic
npm ERR! argv "node" "/usr/bin/npm" "run" "setup"
npm ERR! node v0.12.7
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] setup: `./setup.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] setup script './setup.js'.
npm ERR! This is most likely a problem with the aqua package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./setup.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls aqua
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mb/dev/EBI/npm-debug.log

And here is the npm-debug.log file :

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'run', 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info presetup [email protected]
6 info setup [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec setup script
9 verbose stack Error: [email protected] setup: `./setup.js`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid [email protected]
11 verbose cwd /home/mb/dev/EBI
12 error Linux 3.16.0-45-generic
13 error argv "node" "/usr/bin/npm" "run" "setup"
14 error node v0.12.7
15 error npm  v2.13.3
16 error code ELIFECYCLE
17 error [email protected] setup: `./setup.js`
17 error Exit status 1
18 error Failed at the [email protected] setup script './setup.js'.
18 error This is most likely a problem with the aqua package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     ./setup.js
18 error You can get their info via:
18 error     npm owner ls aqua
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Have i done something wrong or is it a Aqua issue ?

adding new data to this.state in GET_ACCOUNT_SETTINGS_RESPONSE

Not so much of an issue, more of a question!

I have a new text field in AccountsForm.jsx called "job". It has correctly added to the db as seen below:

{ _id: ObjectId("569a9fdf9b4fbb060a3f956a"), name: { first: "Dylan", middle: "James", last: "Thomas" }, timeCreated: ISODate("2016-01-16T19:54:07.334Z"), user: { id: "569a9fdf9b4fbb060a3f9569", name: "daylightdylan" }, job: "Web Dev" }

During onDispatcherAction > GET_ACCOUNT_SETTINGS_RESPONSE in account/stores/Account.js I can see that it is setting the this.state values using the values from action.data., which contains "name" and "timeCreated" however my new "job" variable does not exist. Where do I define/add my new variable to action.data so that it is available? I am new to this and I am completely lost!

this.handleResponseErrors(action.data);
this.state.hydrated = true;
this.state.name = action.data.name; ////exists
this.state.job = action.data.job; ////does not exist
this.state.timeCreated = action.data.timeCreated;  ////exists
this.emitChange();

Thanks in advance

Production readiness vs. drywall

I've noticed that Aqua is missing a few features when compared to Drywall. I also know that Aqua has many more features in some ways since it leverages the Frame API, React, etc!!!

Notably missing:

  • Complete documentation
  • Sitewide search
  • Social signons

I'm excited to use this for production, but have a few questions:

  • How production ready would you consider Aqua vs. drywall?
  • What is the roadmap (if any) for porting over other features?

Problem running npm setup

When I run npm setup, I get the below error after entering values for the prompts (last prompt was for SMTP password). Any thoughts on what I could be doing wrong?

fs.js:491
  binding.open(pathModule._makeLong(path),
          ^
TypeError: path must be a string
    at TypeError (native)
    at Object.fs.open (fs.js:491:11)
    at Object.fs.readFile (fs.js:262:6)
    at Array.Async.auto.createConfig (/Users/timyork/WebstormProjects/aqua/setup.js:98:12)
    at listener (/Users/timyork/WebstormProjects/aqua/node_modules/async/lib/async.js:582:42)
    at /Users/timyork/WebstormProjects/aqua/node_modules/async/lib/async.js:526:17
    at _arrayEach (/Users/timyork/WebstormProjects/aqua/node_modules/async/lib/async.js:78:13)
    at Immediate.taskComplete (/Users/timyork/WebstormProjects/aqua/node_modules/async/lib/async.js:525:13)
    at processImmediate [as _immediateCallback] (timers.js:367:17)

npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "setup"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] setup: `./setup.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] setup script './setup.js'.
npm ERR! This is most likely a problem with the aqua package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./setup.js

Can't create new users

Hello. I'm getting the following error when I run npm start and haven't been able to figure out why:

Debug: auth, unauthenticated, error, session
    Error: Unauthorized
    at Object.exports.create (/Users/alexdixon/aqua-template/node_modules/boom/lib/index.js:21:17)
    at Object.exports.unauthorized (/Users/alexdixon/aqua-template/node_modules/boom/lib/index.js:86:23)
    at validate (/Users/alexdixon/aqua-template/node_modules/hapi-auth-cookie/lib/index.js:114:49)
    at Object.scheme.authenticate (/Users/alexdixon/aqua-template/node_modules/hapi-auth-cookie/lib/index.js:179:13)
    at /Users/alexdixon/aqua-template/node_modules/hapi/lib/auth.js:214:30
    at internals.Protect.run (/Users/alexdixon/aqua-template/node_modules/hapi/lib/protect.js:56:5)
    at authenticate (/Users/alexdixon/aqua-template/node_modules/hapi/lib/auth.js:205:26)
    at internals.Auth._authenticate (/Users/alexdixon/aqua-template/node_modules/hapi/lib/auth.js:328:5)
    at internals.Auth.authenticate (/Users/alexdixon/aqua-template/node_modules/hapi/lib/auth.js:164:17)
    at /Users/alexdixon/aqua-template/node_modules/hapi/lib/request.js:331:13

When trying to create a new user account I get this error:

/Users/alexdixon/aqua-template/server/api/signup.js:170
                var credentials = user.username + ':' + results.session.key;
                                      ^
TypeError: Cannot read property 'username' of undefined
    at /Users/alexdixon/aqua-template/server/api/signup.js:170:39
    at /Users/alexdixon/aqua-template/node_modules/async/lib/async.js:454:17
    at /Users/alexdixon/aqua-template/node_modules/async/lib/async.js:444:17
    at Array.forEach (native)
    at _each (/Users/alexdixon/aqua-template/node_modules/async/lib/async.js:46:24)
    at Object.taskComplete (/Users/alexdixon/aqua-template/node_modules/async/lib/async.js:443:13)
    at processImmediate [as _immediateCallback] (timers.js:345:15)

Both occur just after cloning the repo and following the instructions. I even used a gmail address when running npm run setup. :D

Server start can fail due to plugins not loaded in the right order

Hi,
I was looking at the aqua code, and I remarked that the registration of the auth schemes and strategy prior to routes is not enforced.
As plugins are declared in a Glue manifest, which takes them as an object and iterates over the keys to register them, load order isn't guaranteed. Therefore, server start can fail, if registration of strategies occurs before one of the schemes, or registration of one of the routes occurs before strategies.
Preventing this requires marking strategies registration plugin dependant on schemes plugins, and route plugins using auth dependant on strategies plugin, via plugin attributes, to let hapi server resolve the registration order. Or maybe using prePlugins Glue option to manually register the auth part.
This problem is refferred to in hapijs/glue#19

Tests Not Running

Hello,

Great project! Thank you for creating this example.
I'm able to get the site up and running, but I can't get the tests to run.

I'm getting this error:

Error: Cannot find module 'react-router/modules/locations/TestLocation'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (.../aqua/test/client/pages/account/index.js:2:20)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js [as origLoader] (module.js:478:10)
    at Object.require.extensions.(anonymous function) [as .js] (.../aqua/node_modules/lab/lib/coverage.js:50:26)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at .../aqua/node_modules/lab/lib/cli.js:95:23
    at Array.forEach (native)
    at Object.internals.traverse (.../aqua/node_modules/lab/lib/cli.js:91:19)
    at Object.exports.run (.../aqua/node_modules/lab/lib/cli.js:40:29)
    at Object.<anonymous> (.../aqua/node_modules/lab/bin/lab:3:23)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

{ aqua: '1.0.1',
  npm: '2.5.1',
  http_parser: '2.3',
  modules: '14',
  node: '0.12.0',
  openssl: '1.0.1l',
  uv: '1.0.2',
  v8: '3.28.73',
  zlib: '1.2.8' }

It seems that react-router isn't installed properly since there is no "modules" directory in the "node_modules/react-router" directory. What am I missing?

Best,
Aaron

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.