trailsjs / generator-trails-old

:package: Trails Generator.
Other
6 stars 8 forks source link

Cannot find module './main' #5

Closed tuananh closed 8 years ago

tuananh commented 8 years ago

I installed the generator and then create the app like below

$ npm install -g generator-trails
$ mkdir myApp; cd myApp
$ yo trails
$ npm start

And i got this error Cannot find module './main' from the config/index.js file where there is a require of a missing folder/file exports.main = require('./main')

tjwebb commented 8 years ago

Sorry about that, an oversight on my part. We're still in a phase of fairly rapid development.

This was a naming error in one of the config files. I've resolved this in https://github.com/trailsjs/trails/commit/8ea156c2e16675007bd84ed9b4029659705fa2d6.

tjwebb commented 8 years ago

Published trails 0.0.14. npm update everything and let me know if the issue is resolved.

Thanks for trying out trails.js. Come hang out in our gitter channel to keep up with what we're working on: https://gitter.im/trailsjs/trails

tuananh commented 8 years ago

Thansk for the quick response. I'm getting a new error after this

info: Starting...
debug: trails event: trails:start
verbose: Trailpacks: All Validated.
debug: trails event: trailpack:all:validated
debug: trails event: trailpack:core:configured
debug: trails event: trailpack:repl:configured
debug: trails event: trailpack:router:configured
debug: trails event: trailpack:hapi:configured
debug: trails event: trailpack:all:configured
debug: trails event: trailpack:core:initialized
debug: trails event: trailpack:repl:initialized
debug: trails event: trailpack:router:initialized
error:
 AssertionError: missing path
    at Module.require (module.js:364:3)
    at require (module.js:385:17)
    at Object.registerViews (/Users/anh/myTrailsApp/node_modules/trailpack-hapi/lib/server.js:28:15)
    at Hapi.initialize (/Users/anh/myTrailsApp/node_modules/trailpack-hapi/index.js:37:16)
    at /Users/anh/myTrailsApp/node_modules/trails/index.js:65:26
    at process._tickDomainCallback (node.js:411:9)
    at Function.Module.runMain (module.js:469:11)
    at startup (node.js:136:18)
    at node.js:963:3
debug: trails event: trails:stop
tjwebb commented 8 years ago

Yes, I think this is related to: https://github.com/trailsjs/trailpack-hapi/issues/3.