trailsjs / trails

:evergreen_tree: Modern Web Application Framework for Node.js.
http://trailsjs.io
Other
1.66k stars 70 forks source link

Cannot find module 'lodash' #154

Closed jaumard closed 8 years ago

jaumard commented 8 years ago

Issue Description

Under the DefaultService (https://github.com/trailsjs/trails/blob/master/archetype/api/services/DefaultService.js#L3) lodash is require, but it's not under the package.json so there an error :

Error: Cannot find module 'lodash'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/jaumard/IdeaProjects/angularTrails/api/services/DefaultService.js:4:11)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/jaumard/IdeaProjects/angularTrails/api/services/index.js:3:26)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/jaumard/IdeaProjects/angularTrails/api/index.js:6:20)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)

Environment

tjwebb commented 8 years ago

Ah, oops. We need to just remove DefaultService and DefaultController. I think there's an open issue for this somewhere

jaumard commented 8 years ago

Be careful because if you remove the DefaultController and DefaultService you need to remove DefaultController on trailpack-hapi and trailpack-express4 or they will crash

jaumard commented 8 years ago

I think this is fix now, when did you plan to publish a new version on NPM ? To unlock generator-trails and trailpack-express pending PR.

jaumard commented 8 years ago

Fixed on last Trails version