ga-wdi-boston / team-project

Other
2 stars 39 forks source link

Grunt server not running #374

Closed ghost closed 7 years ago

ghost commented 7 years ago

I get the following message when running grunt server:

`/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:12 return this.charAt(0).toUpperCase() + this.slice(1) ^

TypeError: Cannot read property 'charAt' of undefined at capitalize (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:12:14) at noController (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:16:38) at middlewares (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:36:5) at route (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:42:30) at actions.forEach.action (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:73:5) at Array.forEach (native) at Object.resources (/Users/parth/Desktop/Project-3-backend/lib/wiring/routes.js:67:11) at Object. (/Users/parth/Desktop/Project-3-backend/config/routes.js:21:2) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/Users/parth/Desktop/Project-3-backend/server.js:14:16)`

payne-chris-r commented 7 years ago

Browser template? What is this on line 12 of lib/wiring/routs ?

ghost commented 7 years ago

Express-API template And have not touched the file, but it is: return this.charAt(0).toUpperCase() + this.slice(1)

payne-chris-r commented 7 years ago

Looks like it's trying to build out your routes. Do you have any syntax errors in your routes? What command are you running to spin up your server?

ghost commented 7 years ago

The routes.js file looks fine and there are no syntax errors. And I'm running: grunt server

payne-chris-r commented 7 years ago

Try nodemon

ghost commented 7 years ago

getting the same error

payne-chris-r commented 7 years ago

also, look through closed issues. I'm pretty sure it's something I've seen.

ghost commented 7 years ago

There have been somewhat similar issues, and I've tried implementing solutions, but still returning:

` return this.charAt(0).toUpperCase() + this.slice(1) ^

TypeError: Cannot read property 'charAt' of undefined`

payne-chris-r commented 7 years ago

Did you have a controller set up?

scottyscripts commented 7 years ago

@parthgpatel How is this going?

ghost commented 7 years ago

got it to work. Passed in 'string' in place of 'this' on lines 11 and 12