Skip to content
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

Fresh Install does not work with footprints #5

Closed
randallmeeker opened this issue May 1, 2016 · 4 comments
Closed

Fresh Install does not work with footprints #5

randallmeeker opened this issue May 1, 2016 · 4 comments

Comments

@randallmeeker
Copy link
Contributor

randallmeeker commented May 1, 2016

This was installed using yo trails and specifying hapi & mongoose

config/database.js

module.exports = {
  stores: {

    /**
     * Define a store called "local" which uses SQLite3 to persist data.
     */
    mongo: {
      migrate: 'create',
      uri: 'mongodb://xxxxxx:[email protected]:23000/xxxxxxtest'
    }
  },

  models: {
    defaultStore: 'mongo',
    migrate: 'drop'
  }
}

going to /api/v1/user results in a 500 error and the following outputted to the console.

Output
debug: [FootprintController] (find) model = user , criteria = {} undefined options = Debug: internal, implementation, error TypeError: Uncaught error: FootprintService.find is not a function at FootprintController.find (/home/ubuntu/workspace/node_modules/trailpack-hapi/api/controllers/FootprintController.js:49:35) at Object.exports.execute.internals.prerequisites.internals.handler.callback [as handler] (/home/ubuntu/workspace/node_modules/hapi/lib/handler.js:96:36) at /home/ubuntu/workspace/node_modules/hapi/lib/handler.js:63:26 at done (/home/ubuntu/workspace/node_modules/hapi/node_modules/items/lib/index.js:31:25) at done (/home/ubuntu/workspace/node_modules/hapi/node_modules/items/lib/index.js:63:25) at /home/ubuntu/workspace/node_modules/hapi/lib/handler.js:49:28 at finalize (/home/ubuntu/workspace/node_modules/hapi/lib/handler.js:281:20) at wrapped (/home/ubuntu/workspace/node_modules/hapi/node_modules/hoek/lib/index.js:867:20) at internals.Response._prepare.internals.Response._processPrepare.next [as _processPrepare] (/home/ubuntu/workspace/node_modules/hapi/lib/response.js:457:16) at internals.Response._prepare.next [as _prepare] (/home/ubuntu/workspace/node_modules/hapi/lib/response.js:396:21) at /home/ubuntu/workspace/node_modules/hapi/lib/reply.js:151:22 at nextTickCallbackWith0Args (node.js:420:9) at process._tickDomainCallback (node.js:390:13)

it is known that this error is when an model can not be found, however the model is visible from the console via app.orm.User

app info

{  
   "app":"0.0.0",
   "node":"v4.4.0",
   "libs":{  
      "http_parser":"2.5.2",
      "node":"4.4.0",
      "v8":"4.5.103.35",
      "uv":"1.8.0",
      "zlib":"1.2.8",
      "ares":"1.10.1-DEV",
      "icu":"56.1",
      "modules":"46",
      "openssl":"1.0.2g"
   },
   "trailpacks":[  
      {  
         "name":"core",
         "version":"1.0.0-beta-6"
      },
      {  
         "name":"repl",
         "version":"1.0.2"
      },
      {  
         "name":"router",
         "version":"1.0.0-beta-4"
      },
      {  
         "name":"hapi",
         "version":"1.0.0-beta-5"
      },
      {  
         "name":"mongoose",
         "version":"0.1.0"
      },
      {  
         "name":"footprints",
         "version":"1.0.0-beta-6"
      }
   ]
}
@0cv
Copy link

0cv commented May 10, 2016

Just run into the same issue. Looks like the npm package is outdated compared to the GitHub version, this file https://github.com/trailsjs/trailpack-mongoose/blob/master/api/services/FootprintService.js is completely empty in npm.

Fixed temporarily the issue by updating my package.json with "trailpack-mongoose": "github:trailsjs/trailpack-mongoose"

@randallmeeker
Copy link
Contributor Author

just redid a fresh trails install, updated the npm package as you suggested and now I get no footprint routes generated.

@randallmeeker
Copy link
Contributor Author

also with the update I can not do console commands for the ORM as well.

@konstantinzolotarev
Copy link
Collaborator

@Krisa @randallmeeker pushed new version with changes and fixes.
Also upgraded dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants