I'm using :
- Mojito 0.5.5
- NPM 1.2.14
- NodeJS 0.8.22
I'm trying to create a simple Mojito application using NodeJS modules, packaged with NPM.
Documentation say that :
- Create a Mojito application.
- Add any needed dependencies to dependencies object in package.json.
- Install dependencies with npm: {app_dir}$ npm install
- When Mojito starts, your application will have access to the installed npm modules.
Indeed, the example above isn't working.
"dependencies": {
"mojito": "0.5.x",
"async": "0.2.x"
},
status: function(ac) {
var async = require('async');
ac.done({
status: 'loaded'
});
}
Mojito server : "Error: Cannot find module 'async'"
Web page error : "Error: MODULE_NOT_FOUND"
Any clue ?
PS : Of course, after npm install, the project folder have a node_modules folder with the async package.