Closed jaumard closed 8 years ago
I ran the generator and this only seems to be an issue with hapi? with express, it asks if you want to overwrite some files. If you say 'no' to this, it works fine.
yes it's only with hapi because it doesn't yet embed the web.js
file. Express does :)
oh, nm :dash:
You do get this error though:
error: TypeError: Cannot read property 'services' of undefined
at DefaultController.info (/home/jeff/dev/trails/webapp/api/controllers/DefaultController.js:18:34)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
at next (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
at /home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:330:12)
at next (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:271:10)
at methodOverride (/home/jeff/dev/trails/webapp/node_modules/method-override/index.js:65:14)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:312:13)
at /home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:330:12)
at next (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:271:10)
at compression (/home/jeff/dev/trails/webapp/node_modules/compression/index.js:218:5)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:312:13)
at /home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:330:12)
at next (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:271:10)
at urlencodedParser (/home/jeff/dev/trails/webapp/node_modules/body-parser/lib/types/urlencoded.js:88:40)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:312:13)
at /home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:330:12)
at next (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/index.js:271:10)
at jsonParser (/home/jeff/dev/trails/webapp/node_modules/body-parser/lib/types/json.js:100:40)
at Layer.handle [as handle_request] (/home/jeff/dev/trails/webapp/node_modules/express/lib/router/layer.js:95:5)
@jdell64 thanks ! I just fix it here https://github.com/trailsjs/trailpack-express4/pull/12
Now web.js is copied from web server trailpack. So there some conflict on the
config/index.js
and some files are not added it can be the web.js but it can another config file from a trailpack choose on the generator.First though : One way to resolve this is to rebuild index.js after all trailpacks was installed.
Related to https://github.com/trailsjs/trails/issues/149