serverless-frameworkmoonmail

Trouble deploying function using serverless and MoonMail


I'm trying to deploy a serverless function, however I cannot achieve it.

sls function deploy getBeeTokenProxy
Serverless: Deploying the specified functions in "dev" to the following regions: us-east-1
Serverless: - events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: Cannot find module 'nodent' from 'C:\dev\testproject\_meta\_tmp\getBeeTokenProxy@1491336313096\node_modules\ajv\lib'
    at C:\dev\testproject\node_modules\resolve\lib\async.js:46:31
    at processDirs (C:\dev\testproject\node_modules\resolve\lib\async.js:177:39)
    at ondir (C:\dev\testproject\node_modules\resolve\lib\async.js:192:13)
    at load (C:\dev\testproject\node_modules\resolve\lib\async.js:77:43)
    at onex (C:\dev\testproject\node_modules\resolve\lib\async.js:100:31)
    at C:\dev\testproject\node_modules\resolve\lib\async.js:23:47
    at FSReqWrap.oncomplete (fs.js:114:15)

serverless -v 0.5.6

node -v v7.8.0

Any idea? Maybe I'm using the wrong version of Serverless. I have ajv@^4.9.1 under node_modules.


Solution

  • npm install nodent --save
    npm install js-beautify --save
    

    I put --save here because these librairies are not in the package.json of MoonMail.