Closed konstantinzolotarev closed 8 years ago
related to https://github.com/trailsjs/trailpack-hapi/issues/3. I need to publish a new version of trailpack-hapi.
But on that note, I need to come up with a strategy to democratize the publishing of certain modules. I'll work on a process for this over the weekend. Suggestions are welcome as well.
@tjwebb Actually I used latest version from git. Just linked it.
Same here. Any workaround?
@ronenteva I'm publishing new trails and trailpack-hapi versions tonight with these fixes. Sorry for the inconvenience.
Mark your calendars: Trails 1.0-alpha1 is being released on January 8!
I have this error on template example app and fix it by adding a template engine in config/views.js
/**
* Views Configuration
* (app.config.views)
*
* @see http://trailsjs.io/doc/config/views.js
*/
module.exports = {
engine: 'jade'
}
I fork the repo to fix all the errors and have an example project who is working : https://github.com/jaumard/trails-example-app
I am still having this issue, created a new app with all defaults (except I do not choose to enable footprints), then npm start
and it is complaining about trails/controller
not found from the trailpack-hapi
package... in the api/controllers/FootprintController.js
:
$ npm start
> fideli-api@0.0.0 start /.../my-app
> node server.js
module.js:472
throw err;
^
Error: Cannot find module 'trails/controller'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/.../my-app/node_modules/trailpack-hapi/api/controllers/FootprintController.js:5:20)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/.../my-app/node_modules/trailpack-hapi/api/controllers/index.js:1:93)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/.../my-app/node_modules/trailpack-hapi/api/index.js:1:85)
at Module._compile (module.js:571:32)
npm ERR! Linux 4.4.0-47-generic
npm ERR! argv "/home/huafu/.nvm/versions/node/v7.2.0/bin/node" "/home/huafu/.nvm/versions/node/v7.2.0/lib/node_modules/npm/bin/npm-cli.js" "start"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! fideli-api@0.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fideli-api@0.0.0 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fideli-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fideli-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fideli-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /.../my-app/npm-debug.log
Process finished with exit code 1
FYI:
$ npm version
{ npm: '3.10.9',
ares: '1.10.1-DEV',
cldr: '30.0.2',
http_parser: '2.7.0',
icu: '58.1',
modules: '51',
node: '7.2.0',
openssl: '1.0.2j',
tz: '2016g',
unicode: '9.0',
uv: '1.10.1',
v8: '5.4.500.43',
zlib: '1.2.8' }
Any idea?
@huafu there is a break in the generator as we are switching to 2.0 (it's from us using the term latest
in generated files), the maintainers are aware of the issue and working to get it fixed as soon as possible.
Is there a workaround for the issue mentioned by @huafu ? Except for disabling Footprints?
Yes use only v1 or v2 version of trails modules not a mix of v2/v1
I get this error when starting a brand new trails app:
yo trails
Get ready to blaze a new Trails Application!
Choose a Web Server express
What express version do you want to use ? 4
Choose an ORM waterline
Do you want to use Footprints (automatic REST API from models) ? No
Next .. when I do npm start
I get the following error:
> someproject@0.0.0 start /Users/joost/someproject
> node server.js
module.js:339
throw err;
^
Error: Cannot find module 'trails/controller'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/joost/someproject/node_modules/trailpack-express/lib/utils.js:3:20)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/joost/someproject/node_modules/trailpack-express/lib/server.js:16:15)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
npm ERR! Darwin 16.1.0
npm ERR! argv "/Users/joost/.nvm/versions/node/v4.2.1/bin/node" "/Users/joost/.nvm/versions/node/v4.2.1/bin/npm" "start"
npm ERR! node v4.2.1
npm ERR! npm v4.0.3
npm ERR! code ELIFECYCLE
npm ERR! someproject@0.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the someproject@0.0.0 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the someproject package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs someproject
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls someproject
npm ERR! There is likely additional logging output above.
I know, there some issues with the generator because it set some modules at v1 and some at v2. Just change this on package.json to have only v1 or v2 and it will work normally
@jaumard thanks. Can you give an example for both v1 and v2? I tried but can't seem to find packages for v2:
"trails-controller": "^1.0.0",
"trails-model": "^1.0.0",
"trails-policy": "^1.0.2",
"trails-service": "1.0.0",
We already have this issue described here: https://github.com/trailsjs/trailpack-express/issues/52
Thanks. The solution in https://github.com/trailsjs/trailpack-express/issues/52 worked.
So: change "trailpack-express": "^2.0.0-rc1"
to "trailpack-express": "^1.1.0"
.